summaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/xattr.c
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2023-02-01 14:14:59 +0100
committerChristian Brauner (Microsoft) <brauner@kernel.org>2023-03-06 09:57:13 +0100
commitd9f892b9bdc22b12bc960837a09f014d5a324975 (patch)
treeb59aa0c6871a17c7028cb921badf7098225b3b06 /fs/reiserfs/xattr.c
parentd549b741740e63e87e661754e2d1b336fdc51d50 (diff)
downloadlinux-stable-d9f892b9bdc22b12bc960837a09f014d5a324975.tar.gz
linux-stable-d9f892b9bdc22b12bc960837a09f014d5a324975.tar.bz2
linux-stable-d9f892b9bdc22b12bc960837a09f014d5a324975.zip
reiserfs: rework priv inode handling
Reiserfs is the only filesystem that removes IOP_XATTR without also using a set of dedicated inode operations at the same time that nop all xattr related inode operations. This means we need to have a IOP_XATTR check in vfs_listxattr() instead of just being able to check for ->listxatt() being implemented. Introduce a dedicated set of nop inode operations that are used when IOP_XATTR is removed, allowing us to remove that check from vfs_listxattr(). This in turn allows us to completely decouple POSIX ACLs from IOP_XATTR. Cc: reiserfs-devel@vger.kernel.org Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Diffstat (limited to 'fs/reiserfs/xattr.c')
-rw-r--r--fs/reiserfs/xattr.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
index 354b74bc8072..651027967159 100644
--- a/fs/reiserfs/xattr.c
+++ b/fs/reiserfs/xattr.c
@@ -896,8 +896,7 @@ static int create_privroot(struct dentry *dentry)
return -EOPNOTSUPP;
}
- d_inode(dentry)->i_flags |= S_PRIVATE;
- d_inode(dentry)->i_opflags &= ~IOP_XATTR;
+ reiserfs_init_priv_inode(d_inode(dentry));
reiserfs_info(dentry->d_sb, "Created %s - reserved for xattr "
"storage.\n", PRIVROOT_NAME);
@@ -979,10 +978,8 @@ int reiserfs_lookup_privroot(struct super_block *s)
if (!IS_ERR(dentry)) {
REISERFS_SB(s)->priv_root = dentry;
d_set_d_op(dentry, &xattr_lookup_poison_ops);
- if (d_really_is_positive(dentry)) {
- d_inode(dentry)->i_flags |= S_PRIVATE;
- d_inode(dentry)->i_opflags &= ~IOP_XATTR;
- }
+ if (d_really_is_positive(dentry))
+ reiserfs_init_priv_inode(d_inode(dentry));
} else
err = PTR_ERR(dentry);
inode_unlock(d_inode(s->s_root));