Commit 8ecbe550 authored by Jeff Mahoney's avatar Jeff Mahoney Committed by Linus Torvalds

reiserfs: remove i_has_xattr_dir

With the changes to xattr root locking, the i_has_xattr_dir flag
is no longer needed. This patch removes it.
Signed-off-by: default avatarJeff Mahoney <jeffm@suse.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8b6dd72a
...@@ -459,10 +459,7 @@ int reiserfs_delete_xattrs(struct inode *inode) ...@@ -459,10 +459,7 @@ int reiserfs_delete_xattrs(struct inode *inode)
dput(root); dput(root);
out: out:
if (!err) if (err)
REISERFS_I(inode)->i_flags =
REISERFS_I(inode)->i_flags & ~i_has_xattr_dir;
else
reiserfs_warning(inode->i_sb, "jdm-20004", reiserfs_warning(inode->i_sb, "jdm-20004",
"Couldn't remove all xattrs (%d)\n", err); "Couldn't remove all xattrs (%d)\n", err);
return err; return err;
...@@ -660,7 +657,6 @@ reiserfs_xattr_set(struct inode *inode, const char *name, const void *buffer, ...@@ -660,7 +657,6 @@ reiserfs_xattr_set(struct inode *inode, const char *name, const void *buffer,
down_write(&REISERFS_I(inode)->i_xattr_sem); down_write(&REISERFS_I(inode)->i_xattr_sem);
xahash = xattr_hash(buffer, buffer_size); xahash = xattr_hash(buffer, buffer_size);
REISERFS_I(inode)->i_flags |= i_has_xattr_dir;
/* Resize it so we're ok to write there */ /* Resize it so we're ok to write there */
newattrs.ia_size = buffer_size; newattrs.ia_size = buffer_size;
...@@ -769,7 +765,6 @@ reiserfs_xattr_get(const struct inode *inode, const char *name, void *buffer, ...@@ -769,7 +765,6 @@ reiserfs_xattr_get(const struct inode *inode, const char *name, void *buffer,
down_read(&REISERFS_I(inode)->i_xattr_sem); down_read(&REISERFS_I(inode)->i_xattr_sem);
isize = i_size_read(dentry->d_inode); isize = i_size_read(dentry->d_inode);
REISERFS_I(inode)->i_flags |= i_has_xattr_dir;
/* Just return the size needed */ /* Just return the size needed */
if (buffer == NULL) { if (buffer == NULL) {
...@@ -999,8 +994,6 @@ ssize_t reiserfs_listxattr(struct dentry * dentry, char *buffer, size_t size) ...@@ -999,8 +994,6 @@ ssize_t reiserfs_listxattr(struct dentry * dentry, char *buffer, size_t size)
buf.r_pos = 0; buf.r_pos = 0;
buf.r_inode = dentry->d_inode; buf.r_inode = dentry->d_inode;
REISERFS_I(dentry->d_inode)->i_flags |= i_has_xattr_dir;
mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_XATTR); mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_XATTR);
err = xattr_readdir(dir->d_inode, reiserfs_listxattr_filler, &buf); err = xattr_readdir(dir->d_inode, reiserfs_listxattr_filler, &buf);
mutex_unlock(&dir->d_inode->i_mutex); mutex_unlock(&dir->d_inode->i_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment