packages: kernel/kernel-apparmor.patch, kernel/kernel-mpt-fusion.patch, ker...

arekm arekm at pld-linux.org
Mon Jul 20 14:57:52 CEST 2009


Author: arekm                        Date: Mon Jul 20 12:57:52 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
 -started update to 2.6.30; patches apply when using --without grsecurity

---- Files affected:
packages/kernel:
   kernel-apparmor.patch (1.2 -> 1.3) , kernel-mpt-fusion.patch (1.3 -> 1.4) , kernel-owner-xid.patch (1.2 -> 1.3) , kernel-routes.patch (1.2 -> 1.3) , kernel-tuxonice-headers.patch (1.2 -> 1.3) , kernel-tuxonice.patch (1.4 -> 1.5) , kernel-unionfs.patch (1.2 -> 1.3) , kernel-vserver-2.3.patch (1.11 -> 1.12) , kernel-warnings.patch (1.2 -> 1.3) , kernel.spec (1.676 -> 1.677) , kernel-apparmor-common.patch (1.2 -> NONE)  (REMOVED), kernel-bzip2-lzma.patch (1.2 -> NONE)  (REMOVED)

---- Diffs:

================================================================
Index: packages/kernel/kernel-apparmor.patch
diff -u packages/kernel/kernel-apparmor.patch:1.2 packages/kernel/kernel-apparmor.patch:1.3
--- packages/kernel/kernel-apparmor.patch:1.2	Tue Mar 31 14:04:21 2009
+++ packages/kernel/kernel-apparmor.patch	Mon Jul 20 14:57:26 2009
@@ -1,2041 +1,7 @@
-diff -uprN e/fs/afs/dir.c f/fs/afs/dir.c
---- e/fs/afs/dir.c	2008-04-17 02:49:44.000000000 +0000
-+++ f/fs/afs/dir.c	2008-05-28 20:29:29.410207000 +0000
-@@ -45,6 +45,7 @@ const struct file_operations afs_dir_fil
- 	.release	= afs_release,
- 	.readdir	= afs_readdir,
- 	.lock		= afs_lock,
-+	.fsetattr	= afs_fsetattr,
- };
- 
- const struct inode_operations afs_dir_inode_operations = {
-diff -uprN e/fs/afs/file.c f/fs/afs/file.c
---- e/fs/afs/file.c	2008-04-17 02:49:44.000000000 +0000
-+++ f/fs/afs/file.c	2008-05-28 20:29:29.410207000 +0000
-@@ -36,6 +36,7 @@ const struct file_operations afs_file_op
- 	.fsync		= afs_fsync,
- 	.lock		= afs_lock,
- 	.flock		= afs_flock,
-+	.fsetattr	= afs_fsetattr,
- };
- 
- const struct inode_operations afs_file_inode_operations = {
-diff -uprN e/fs/afs/inode.c f/fs/afs/inode.c
---- e/fs/afs/inode.c	2008-04-17 02:49:44.000000000 +0000
-+++ f/fs/afs/inode.c	2008-05-28 20:29:29.410207000 +0000
-@@ -358,7 +358,8 @@ void afs_clear_inode(struct inode *inode
- /*
-  * set the attributes of an inode
-  */
--int afs_setattr(struct dentry *dentry, struct iattr *attr)
-+static int afs_do_setattr(struct dentry *dentry, struct iattr *attr,
-+		   struct file *file)
- {
- 	struct afs_vnode *vnode = AFS_FS_I(dentry->d_inode);
- 	struct key *key;
-@@ -380,8 +381,8 @@ int afs_setattr(struct dentry *dentry, s
- 		afs_writeback_all(vnode);
- 	}
- 
--	if (attr->ia_valid & ATTR_FILE) {
--		key = attr->ia_file->private_data;
-+	if (file) {
-+		key = file->private_data;
- 	} else {
- 		key = afs_request_key(vnode->volume->cell);
- 		if (IS_ERR(key)) {
-@@ -391,10 +392,20 @@ int afs_setattr(struct dentry *dentry, s
- 	}
- 
- 	ret = afs_vnode_setattr(vnode, key, attr);
--	if (!(attr->ia_valid & ATTR_FILE))
-+	if (!file)
- 		key_put(key);
- 
- error:
- 	_leave(" = %d", ret);
- 	return ret;
- }
-+
-+int afs_setattr(struct dentry *dentry, struct iattr *attr)
-+{
-+	return afs_do_setattr(dentry, attr, NULL);
-+}
-+
-+int afs_fsetattr(struct file *file, struct iattr *attr)
-+{
-+	return afs_do_setattr(file->f_path.dentry, attr, file);
-+}
-diff -uprN e/fs/afs/internal.h f/fs/afs/internal.h
---- e/fs/afs/internal.h	2008-04-17 02:49:44.000000000 +0000
-+++ f/fs/afs/internal.h	2008-05-28 20:29:29.410207000 +0000
-@@ -550,6 +550,7 @@ extern void afs_zap_data(struct afs_vnod
- extern int afs_validate(struct afs_vnode *, struct key *);
- extern int afs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
- extern int afs_setattr(struct dentry *, struct iattr *);
-+extern int afs_fsetattr(struct file *, struct iattr *);
- extern void afs_clear_inode(struct inode *);
- 
- /*
-diff -uprN e/fs/attr.c f/fs/attr.c
---- e/fs/attr.c	2008-04-17 02:49:44.000000000 +0000
-+++ f/fs/attr.c	2008-05-28 20:29:29.410207000 +0000
-@@ -100,7 +100,8 @@ int inode_setattr(struct inode * inode, 
- }
- EXPORT_SYMBOL(inode_setattr);
- 
--int notify_change(struct dentry * dentry, struct iattr * attr)
-+int fnotify_change(struct dentry *dentry, struct vfsmount *mnt,
-+		   struct iattr *attr, struct file *file)
- {
- 	struct inode *inode = dentry->d_inode;
- 	mode_t mode = inode->i_mode;
-@@ -158,13 +159,17 @@ int notify_change(struct dentry * dentry
- 		down_write(&dentry->d_inode->i_alloc_sem);
- 
- 	if (inode->i_op && inode->i_op->setattr) {
--		error = security_inode_setattr(dentry, attr);
--		if (!error)
--			error = inode->i_op->setattr(dentry, attr);
-+		error = security_inode_setattr(dentry, mnt, attr);
-+		if (!error) {
-+			if (file && file->f_op && file->f_op->fsetattr)
-+				error = file->f_op->fsetattr(file, attr);
-+			else
-+				error = inode->i_op->setattr(dentry, attr);
-+		}
- 	} else {
- 		error = inode_change_ok(inode, attr);
- 		if (!error)
--			error = security_inode_setattr(dentry, attr);
-+			error = security_inode_setattr(dentry, mnt, attr);
- 		if (!error) {
- 			if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) ||
- 			    (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid))
-@@ -182,5 +187,12 @@ int notify_change(struct dentry * dentry
- 
- 	return error;
- }
-+EXPORT_SYMBOL_GPL(fnotify_change);
-+
-+int notify_change(struct dentry *dentry, struct vfsmount *mnt,
-+		  struct iattr *attr)
-+{
-+	return fnotify_change(dentry, mnt, attr, NULL);
-+}
- 
- EXPORT_SYMBOL(notify_change);
-diff -uprN e/fs/dcache.c f/fs/dcache.c
---- e/fs/dcache.c	2008-04-17 02:49:44.000000000 +0000
-+++ f/fs/dcache.c	2008-05-28 20:29:29.410207000 +0000
-@@ -1747,86 +1747,118 @@ shouldnt_be_hashed:
- }
- 
- /**
-- * d_path - return the path of a dentry
-+ * __d_path - return the path of a dentry
-  * @dentry: dentry to report
-  * @vfsmnt: vfsmnt to which the dentry belongs
-  * @root: root dentry
-  * @rootmnt: vfsmnt to which the root dentry belongs
-  * @buffer: buffer to return value in
-  * @buflen: buffer length
-+ * @fail_deleted: what to return for deleted files
-+ * @disconnect: don't return a path starting with / when disconnected
-  *
-- * Convert a dentry into an ASCII path name. If the entry has been deleted
-+ * Convert a dentry into an ASCII path name. If the entry has been deleted,
-+ * then if @fail_deleted is true, ERR_PTR(-ENOENT) is returned. Otherwise,
-  * the string " (deleted)" is appended. Note that this is ambiguous.
-  *
-  * Returns the buffer or an error code if the path was too long.
-+ * If @dentry is not connected to @root, the path returned will be relative
-+ * (i.e., it will not start with a slash).
-  *
-- * "buflen" should be positive. Caller holds the dcache_lock.
-+ * Returns the buffer or an error code.
-  */
--static char *__d_path(struct dentry *dentry, struct vfsmount *vfsmnt,
--		       struct path *root, char *buffer, int buflen)
-+char *__d_path(struct dentry *dentry, struct vfsmount *vfsmnt,
-+	       struct path *root, char *buffer, int buflen,
-+	       int fail_deleted, int disconnect)
- {
--	char * end = buffer+buflen;
--	char * retval;
--	int namelen;
-+	int namelen, vfsmount_locked = 0;
-+	const unsigned char *name;
-+
-+	if (buflen < 2)
-+		return ERR_PTR(-ENAMETOOLONG);
-+	buffer += --buflen;
-+	*buffer = '\0';
- 
--	*--end = '\0';
--	buflen--;
-+	spin_lock(&dcache_lock);
- 	if (!IS_ROOT(dentry) && d_unhashed(dentry)) {
--		buflen -= 10;
--		end -= 10;
--		if (buflen < 0)
-+		if (fail_deleted) {
-+			buffer = ERR_PTR(-ENOENT);
-+			goto out;
-+		}
-+		if (buflen < 10)
- 			goto Elong;
--		memcpy(end, " (deleted)", 10);
-+		buflen -= 10;
-+		buffer -= 10;
-+		memcpy(buffer, " (deleted)", 10);
- 	}
- 
--	if (buflen < 1)
--		goto Elong;
--	/* Get '/' right */
--	retval = end-1;
--	*retval = '/';
--
--	for (;;) {
-+	while (dentry != root->dentry || vfsmnt != root->mnt) {
- 		struct dentry * parent;
- 
--		if (dentry == root->dentry && vfsmnt == root->mnt)
--			break;
- 		if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) {
--			/* Global root? */
--			spin_lock(&vfsmount_lock);
--			if (vfsmnt->mnt_parent == vfsmnt) {
--				spin_unlock(&vfsmount_lock);
--				goto global_root;
-+			if (!vfsmount_locked) {
-+				spin_lock(&vfsmount_lock);
-+				vfsmount_locked = 1;
- 			}
-+			if (vfsmnt->mnt_parent == vfsmnt)
-+				goto global_root;
- 			dentry = vfsmnt->mnt_mountpoint;
- 			vfsmnt = vfsmnt->mnt_parent;
--			spin_unlock(&vfsmount_lock);
- 			continue;
- 		}
- 		parent = dentry->d_parent;
- 		prefetch(parent);
- 		namelen = dentry->d_name.len;
--		buflen -= namelen + 1;
--		if (buflen < 0)
-+		if (buflen < namelen + 1)
- 			goto Elong;
--		end -= namelen;
--		memcpy(end, dentry->d_name.name, namelen);
--		*--end = '/';
--		retval = end;
-+		buflen -= namelen + 1;
-+		buffer -= namelen;
-+		memcpy(buffer, dentry->d_name.name, namelen);
-+		*--buffer = '/';
- 		dentry = parent;
- 	}
-+	/* Get '/' right. */
-+	if (*buffer != '/')
-+		*--buffer = '/';
- 
--	return retval;
-+out:
-+	if (vfsmount_locked)
-+		spin_unlock(&vfsmount_lock);
-+	spin_unlock(&dcache_lock);
-+	return buffer;
- 
- global_root:
-+	/*
-+	 * We went past the (vfsmount, dentry) we were looking for and have
-+	 * either hit a root dentry, a lazily unmounted dentry, an
-+	 * unconnected dentry, or the file is on a pseudo filesystem.
-+	 */
- 	namelen = dentry->d_name.len;
--	buflen -= namelen;
--	if (buflen < 0)
-+	name = dentry->d_name.name;
-+
-+	/*
-+	 * If this is a root dentry, then overwrite the slash.  This
-+	 * will also DTRT with pseudo filesystems which have root
-+	 * dentries named "foo:".
-+	 */
-+	if (IS_ROOT(dentry)) {
-+		buffer++;
-+		buflen++;
-+	}
-+	if (disconnect && *name == '/') {
-+	    /* Make sure we won't return a pathname starting with '/' */
-+		name++;
-+		namelen--;
-+	}
-+	if (buflen < namelen)
- 		goto Elong;
--	retval -= namelen-1;	/* hit the slash */
--	memcpy(retval, dentry->d_name.name, namelen);
--	return retval;
-+	buffer -= namelen;
-+	memcpy(buffer, dentry->d_name.name, namelen);
-+	goto out;
-+
- Elong:
--	return ERR_PTR(-ENAMETOOLONG);
-+	buffer = ERR_PTR(-ENAMETOOLONG);
-+	goto out;
- }
- 
- /**
-@@ -1861,9 +1893,7 @@ char *d_path(struct path *path, char *bu
- 	root = current->fs->root;
- 	path_get(&current->fs->root);
- 	read_unlock(&current->fs->lock);
--	spin_lock(&dcache_lock);
--	res = __d_path(path->dentry, path->mnt, &root, buf, buflen);
--	spin_unlock(&dcache_lock);
-+	res = __d_path(path->dentry, path->mnt, &root, buf, buflen, 0, 0);
- 	path_put(&root);
- 	return res;
- }
-@@ -1909,9 +1939,9 @@ char *dynamic_dname(struct dentry *dentr
-  */
- asmlinkage long sys_getcwd(char __user *buf, unsigned long size)
- {
--	int error;
-+	int error, len;
- 	struct path pwd, root;
--	char *page = (char *) __get_free_page(GFP_USER);
-+	char *page = (char *) __get_free_page(GFP_USER), *cwd;
- 
- 	if (!page)
- 		return -ENOMEM;
-@@ -1923,29 +1953,18 @@ asmlinkage long sys_getcwd(char __user *
- 	path_get(&current->fs->root);
- 	read_unlock(&current->fs->lock);
- 
--	error = -ENOENT;
--	/* Has the current directory has been unlinked? */
--	spin_lock(&dcache_lock);
--	if (pwd.dentry->d_parent == pwd.dentry || !d_unhashed(pwd.dentry)) {
--		unsigned long len;
--		char * cwd;
--
--		cwd = __d_path(pwd.dentry, pwd.mnt, &root, page, PAGE_SIZE);
--		spin_unlock(&dcache_lock);
--
--		error = PTR_ERR(cwd);
--		if (IS_ERR(cwd))
--			goto out;
--
--		error = -ERANGE;
--		len = PAGE_SIZE + page - cwd;
--		if (len <= size) {
--			error = len;
--			if (copy_to_user(buf, cwd, len))
--				error = -EFAULT;
--		}
--	} else
--		spin_unlock(&dcache_lock);
-+	cwd = __d_path(pwd.dentry, pwd.mnt, &root, page, PAGE_SIZE, 1, 0);
-+	error = PTR_ERR(cwd);
-+	if (IS_ERR(cwd))
-+		goto out;
-+
-+	error = -ERANGE;
-+	len = PAGE_SIZE + page - cwd;
-+	if (len <= size) {
-+		error = len;
-+		if (copy_to_user(buf, cwd, len))
-+			error = -EFAULT;
-+	}
- 
- out:
- 	path_put(&pwd);
-diff -uprN e/fs/ecryptfs/inode.c f/fs/ecryptfs/inode.c
---- e/fs/ecryptfs/inode.c	2008-04-17 02:49:44.000000000 +0000
-+++ f/fs/ecryptfs/inode.c	2008-05-28 20:29:28.910241000 +0000
-@@ -388,19 +388,24 @@ static int ecryptfs_link(struct dentry *
- 			 struct dentry *new_dentry)
- {
- 	struct dentry *lower_old_dentry;
-+	struct vfsmount *lower_old_mnt;
- 	struct dentry *lower_new_dentry;
-+	struct vfsmount *lower_new_mnt;
- 	struct dentry *lower_dir_dentry;
- 	u64 file_size_save;
- 	int rc;
- 
- 	file_size_save = i_size_read(old_dentry->d_inode);
- 	lower_old_dentry = ecryptfs_dentry_to_lower(old_dentry);
-+	lower_old_mnt = ecryptfs_dentry_to_lower_mnt(old_dentry);
- 	lower_new_dentry = ecryptfs_dentry_to_lower(new_dentry);
-+	lower_new_mnt = ecryptfs_dentry_to_lower_mnt(new_dentry);
- 	dget(lower_old_dentry);
- 	dget(lower_new_dentry);
- 	lower_dir_dentry = lock_parent(lower_new_dentry);
--	rc = vfs_link(lower_old_dentry, lower_dir_dentry->d_inode,
--		      lower_new_dentry, NULL);
-+	rc = vfs_link(lower_old_dentry, lower_old_mnt,
-+		      lower_dir_dentry->d_inode, lower_new_dentry,
-+		      lower_new_mnt, NULL);
- 	if (rc || !lower_new_dentry->d_inode)
- 		goto out_lock;
- 	rc = ecryptfs_interpose(lower_new_dentry, new_dentry, dir->i_sb, 0);
-@@ -425,10 +430,11 @@ static int ecryptfs_unlink(struct inode 
- 	int rc = 0;
- 	struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry);
-+	struct vfsmount *lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry);
- 	struct inode *lower_dir_inode = ecryptfs_inode_to_lower(dir);
- 	struct dentry *lower_dir_dentry;
- 
- 	lower_dir_dentry = lock_parent(lower_dentry);
--	rc = vfs_unlink(lower_dir_inode, lower_dentry, NULL);
-+	rc = vfs_unlink(lower_dir_inode, lower_dentry, NULL, lower_mnt);
- 	if (rc) {
- 		printk(KERN_ERR "Error in vfs_unlink; rc = [%d]\n", rc);
- 		goto out_unlock;
-@@ -448,6 +454,7 @@ static int ecryptfs_symlink(struct inode
- {
- 	int rc;
- 	struct dentry *lower_dentry;
-+	struct vfsmount *lower_mnt;
- 	struct dentry *lower_dir_dentry;
- 	umode_t mode;
- 	char *encoded_symname;
-@@ -456,6 +463,7 @@ static int ecryptfs_symlink(struct inode
- 
- 	lower_dentry = ecryptfs_dentry_to_lower(dentry);
- 	dget(lower_dentry);
-+	lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry);
- 	lower_dir_dentry = lock_parent(lower_dentry);
- 	mode = S_IALLUGO;
- 	encoded_symlen = ecryptfs_encode_filename(crypt_stat, symname,
-@@ -465,7 +473,7 @@ static int ecryptfs_symlink(struct inode
- 		rc = encoded_symlen;
- 		goto out_lock;
- 	}
--	rc = vfs_symlink(lower_dir_dentry->d_inode, lower_dentry,
-+	rc = vfs_symlink(lower_dir_dentry->d_inode, lower_dentry, lower_mnt,
- 			 encoded_symname, mode, NULL);
- 	kfree(encoded_symname);
- 	if (rc || !lower_dentry->d_inode)
-@@ -487,11 +495,14 @@ static int ecryptfs_mkdir(struct inode *
- {
- 	int rc;
- 	struct dentry *lower_dentry;
-+	struct vfsmount *lower_mnt;
- 	struct dentry *lower_dir_dentry;
- 
- 	lower_dentry = ecryptfs_dentry_to_lower(dentry);
-+	lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry);
- 	lower_dir_dentry = lock_parent(lower_dentry);
--	rc = vfs_mkdir(lower_dir_dentry->d_inode, lower_dentry, mode, NULL);
-+	rc = vfs_mkdir(lower_dir_dentry->d_inode, lower_dentry, lower_mnt,
-+		       mode, NULL);
- 	if (rc || !lower_dentry->d_inode)
- 		goto out;
- 	rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 0);
-@@ -510,14 +521,16 @@ out:
- static int ecryptfs_rmdir(struct inode *dir, struct dentry *dentry)
- {
- 	struct dentry *lower_dentry;
-+	struct vfsmount *lower_mnt;
- 	struct dentry *lower_dir_dentry;
- 	int rc;
- 
- 	lower_dentry = ecryptfs_dentry_to_lower(dentry);
-+	lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry);
- 	dget(dentry);
- 	lower_dir_dentry = lock_parent(lower_dentry);
- 	dget(lower_dentry);
--	rc = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry, NULL);
-+	rc = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry, NULL, lower_mnt);
- 	dput(lower_dentry);
- 	if (!rc)
- 		d_delete(lower_dentry);
-@@ -535,11 +548,14 @@ ecryptfs_mknod(struct inode *dir, struct
- {
- 	int rc;
- 	struct dentry *lower_dentry;
-+	struct vfsmount *lower_mnt;
- 	struct dentry *lower_dir_dentry;
- 
- 	lower_dentry = ecryptfs_dentry_to_lower(dentry);
-+	lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry);
- 	lower_dir_dentry = lock_parent(lower_dentry);
--	rc = vfs_mknod(lower_dir_dentry->d_inode, lower_dentry, mode, dev, NULL);
-+	rc = vfs_mknod(lower_dir_dentry->d_inode, lower_dentry, lower_mnt, mode,
-+		       dev, NULL);
- 	if (rc || !lower_dentry->d_inode)
- 		goto out;
- 	rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 0);
-@@ -560,19 +576,24 @@ ecryptfs_rename(struct inode *old_dir, s
- {
- 	int rc;
- 	struct dentry *lower_old_dentry;
-+	struct vfsmount *lower_old_mnt;
- 	struct dentry *lower_new_dentry;
-+	struct vfsmount *lower_new_mnt;
- 	struct dentry *lower_old_dir_dentry;
- 	struct dentry *lower_new_dir_dentry;
- 
- 	lower_old_dentry = ecryptfs_dentry_to_lower(old_dentry);
-+	lower_old_mnt = ecryptfs_dentry_to_lower_mnt(old_dentry);
- 	lower_new_dentry = ecryptfs_dentry_to_lower(new_dentry);
-+	lower_new_mnt = ecryptfs_dentry_to_lower_mnt(new_dentry);
- 	dget(lower_old_dentry);
- 	dget(lower_new_dentry);
- 	lower_old_dir_dentry = dget_parent(lower_old_dentry);
- 	lower_new_dir_dentry = dget_parent(lower_new_dentry);
- 	lock_rename(lower_old_dir_dentry, lower_new_dir_dentry);
- 	rc = vfs_rename(lower_old_dir_dentry->d_inode, lower_old_dentry,
--			lower_new_dir_dentry->d_inode, lower_new_dentry);
-+			lower_old_mnt, lower_new_dir_dentry->d_inode,
-+			lower_new_dentry, lower_new_mnt);
- 	if (rc)
- 		goto out_lock;
- 	fsstack_copy_attr_all(new_dir, lower_new_dir_dentry->d_inode, NULL);
-@@ -848,6 +869,7 @@ static int ecryptfs_setattr(struct dentr
- {
- 	int rc = 0;
- 	struct dentry *lower_dentry;
-+	struct vfsmount *lower_mnt;
- 	struct inode *inode;
- 	struct inode *lower_inode;
- 	struct ecryptfs_crypt_stat *crypt_stat;
-@@ -858,6 +880,7 @@ static int ecryptfs_setattr(struct dentr
- 	inode = dentry->d_inode;
- 	lower_inode = ecryptfs_inode_to_lower(inode);
- 	lower_dentry = ecryptfs_dentry_to_lower(dentry);
-+	lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry);
- 	mutex_lock(&crypt_stat->cs_mutex);
- 	if (S_ISDIR(dentry->d_inode->i_mode))
- 		crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED);
-@@ -927,7 +927,7 @@
- 		ia->ia_valid &= ~ATTR_MODE;
- 
- 	mutex_lock(&lower_dentry->d_inode->i_mutex);
--	rc = notify_change(lower_dentry, ia);
-+	rc = notify_change(lower_dentry, lower_mnt, ia);
- 	mutex_unlock(&lower_dentry->d_inode->i_mutex);
- out:
- 	fsstack_copy_attr_all(inode, lower_inode);
-diff -uprN e/fs/exec.c f/fs/exec.c
---- e/fs/exec.c	2008-04-17 02:49:44.000000000 +0000
-+++ f/fs/exec.c	2008-05-28 20:29:28.910241000 +0000
-@@ -1777,7 +1777,8 @@ int do_coredump(long signr, int exit_cod
- 		goto close_fail;
- 	if (!file->f_op->write)
- 		goto close_fail;
--	if (!ispipe && do_truncate(file->f_path.dentry, 0, 0, file) != 0)
-+	if (!ispipe &&
-+	    do_truncate(file->f_path.dentry, file->f_path.mnt, 0, 0, file) != 0)
- 		goto close_fail;
- 
- 	retval = binfmt->core_dump(signr, regs, file, core_limit);
-diff -uprN e/fs/fat/file.c f/fs/fat/file.c
---- e/fs/fat/file.c	2008-04-17 02:49:44.000000000 +0000
-+++ f/fs/fat/file.c	2008-05-28 20:29:28.910241000 +0000
-@@ -92,7 +92,7 @@ int fat_generic_ioctl(struct inode *inod
- 		}
- 
- 		/* This MUST be done before doing anything irreversible... */
--		err = notify_change(filp->f_path.dentry, &ia);
-+		err = notify_change(filp->f_path.dentry, filp->f_path.mnt, &ia);
- 		if (err)
- 			goto up;
- 
-diff -uprN e/fs/fuse/dir.c f/fs/fuse/dir.c
---- e/fs/fuse/dir.c	2008-04-17 02:49:44.000000000 +0000
-+++ f/fs/fuse/dir.c	2008-05-28 20:29:29.410207000 +0000
-@@ -1064,21 +1064,22 @@ static int fuse_dir_fsync(struct file *f
- 	return file ? fuse_fsync_common(file, de, datasync, 1) : 0;
- }
- 
--static bool update_mtime(unsigned ivalid)
-+static bool update_mtime(unsigned ivalid, bool have_file)
- {
- 	/* Always update if mtime is explicitly set  */
- 	if (ivalid & ATTR_MTIME_SET)
- 		return true;
- 
- 	/* If it's an open(O_TRUNC) or an ftruncate(), don't update */
--	if ((ivalid & ATTR_SIZE) && (ivalid & (ATTR_OPEN | ATTR_FILE)))
-+	if ((ivalid & ATTR_SIZE) && ((ivalid & ATTR_OPEN) || have_file))
- 		return false;
- 
- 	/* In all other cases update */
- 	return true;
- }
- 
--static void iattr_to_fattr(struct iattr *iattr, struct fuse_setattr_in *arg)
-+static void iattr_to_fattr(struct iattr *iattr, struct fuse_setattr_in *arg,
-+			   bool have_file)
- {
- 	unsigned ivalid = iattr->ia_valid;
- 
-@@ -1097,7 +1098,7 @@ static void iattr_to_fattr(struct iattr 
- 		if (!(ivalid & ATTR_ATIME_SET))
- 			arg->valid |= FATTR_ATIME_NOW;
- 	}
--	if ((ivalid & ATTR_MTIME) && update_mtime(ivalid)) {
-+	if ((ivalid & ATTR_MTIME) && update_mtime(ivalid, have_file)) {
- 		arg->valid |= FATTR_MTIME;
- 		arg->mtime = iattr->ia_mtime.tv_sec;
- 		arg->mtimensec = iattr->ia_mtime.tv_nsec;
-@@ -1114,8 +1115,8 @@ static void iattr_to_fattr(struct iattr 
-  * vmtruncate() doesn't allow for this case, so do the rlimit checking
-  * and the actual truncation by hand.
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-apparmor.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-mpt-fusion.patch?r1=1.3&r2=1.4&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-owner-xid.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-routes.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-tuxonice-headers.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-tuxonice.patch?r1=1.4&r2=1.5&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-unionfs.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-vserver-2.3.patch?r1=1.11&r2=1.12&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-warnings.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel.spec?r1=1.676&r2=1.677&f=u



More information about the pld-cvs-commit mailing list