From: Miklos Szeredi <mszeredi@suse.cz>
Reiserfs calls notify_change() on it's private extended attribute
files to resize and change ownership of these files. Replace with
reiserfs_setattr().
This is equivalent, except that:
- i_alloc_sem locking is not performed around reiserfs_setattr() when
the size is changed
- security_inode_setattr() is not called before reiserfs_setattr()
- fsnotify_change() is not called after reiserfs_setattr()
None of the above is necessary, since the files are private to
reiserfs and inaccessible from userspace.
Also remove setting of ctime on the xattr files.
Based on patch by Jeff Mahoney.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Acked-by: Jeff Mahoney <jeffm@suse.de>
---
fs/reiserfs/xattr.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Index: linux-2.6/fs/reiserfs/xattr.c
===================================================================
--- linux-2.6.orig/fs/reiserfs/xattr.c 2008-05-05 11:29:25.000000000 +0200
+++ linux-2.6/fs/reiserfs/xattr.c 2008-05-05 11:29:25.000000000 +0200
@@ -458,9 +458,9 @@ reiserfs_xattr_set(struct inode *inode,
/* Resize it so we're ok to write there */
newattrs.ia_size = buffer_size;
- newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
+ newattrs.ia_valid = ATTR_SIZE;
mutex_lock_nested(&xinode->i_mutex, I_MUTEX_XATTR);
- err = notify_change(dentry, &newattrs);
+ err = reiserfs_setattr(dentry, &newattrs);
if (err)
goto out_filp;
@@ -810,7 +810,7 @@ reiserfs_chown_xattrs_filler(void *buf,
}
if (!S_ISDIR(xafile->d_inode->i_mode))
- err = notify_change(xafile, attrs);
+ err = reiserfs_setattr(xafile, attrs);
dput(xafile);
return err;
@@ -843,7 +843,7 @@ int reiserfs_chown_xattrs(struct inode *
lock_kernel();
- attrs->ia_valid &= (ATTR_UID | ATTR_GID | ATTR_CTIME);
+ attrs->ia_valid &= (ATTR_UID | ATTR_GID);
buf.xadir = dir;
buf.attrs = attrs;
buf.inode = inode;
@@ -854,7 +854,7 @@ int reiserfs_chown_xattrs(struct inode *
goto out_dir;
}
- err = notify_change(dir, attrs);
+ err = reiserfs_setattr(dir, attrs);
unlock_kernel();
out_dir:
--
--
| Alex Samad | page swap allocation error/failure in 2.6.25 |
| Bart Van Assche | Re: Integration of SCST in the mainstream Linux kernel |
| Andrea Arcangeli | [PATCH 06 of 11] rwsem contended |
| Chuck Ebbert | Why do so many machines need "noapic"? |
git: | |
| Andy Parkins | svn:externals using git submodules |
| Elijah Newren | Trying to use git-filter-branch to compress history by removing large, obsolete bi... |
| Marcus Griep | [PATCH] git-svn: Make it scream by minimizing temp files |
| Tommi Virtanen | [PATCH] "git shell" won't work, need "git-shell" |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Theo de Raadt | Re: Chatting with developers? Is it soo 1996? |
| Ted Unangst | Re: MAXDSIZ 1GB memory limit for process |
| Richard Stallman | Real men don't attack straw men |
| Denys Fedoryshchenko | Re: thousands of classes, e1000 TX unit hang |
| Suresh Siddha | Re: Kernel oops with 2.6.26, padlock and ipsec: probably problem with fpu state ch... |
| Simon Horman | Re: [PATCH] sendfile() and UDP socket |
| Jeff Garzik | Re: [PATCH] sky2: jumbo frame regression fix |
