diff options
author | Jeff Mahoney <jeffm@suse.com> | 2019-10-24 16:31:27 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2019-10-31 15:39:24 +0100 |
commit | 60e4cf67a582d64f07713eda5fcc8ccdaf7833e6 (patch) | |
tree | 1ed799d293f5d1c71bd21207430da9b7add2ca75 /fs/reiserfs/reiserfs.h | |
parent | ext2: return error when fail to allocating memory in ioctl (diff) | |
download | linux-60e4cf67a582d64f07713eda5fcc8ccdaf7833e6.tar.xz linux-60e4cf67a582d64f07713eda5fcc8ccdaf7833e6.zip |
reiserfs: fix extended attributes on the root directory
Since commit d0a5b995a308 (vfs: Add IOP_XATTR inode operations flag)
extended attributes haven't worked on the root directory in reiserfs.
This is due to reiserfs conditionally setting the sb->s_xattrs handler
array depending on whether it located or create the internal privroot
directory. It necessarily does this after the root inode is already
read in. The IOP_XATTR flag is set during inode initialization, so
it never gets set on the root directory.
This commit unconditionally assigns sb->s_xattrs and clears IOP_XATTR on
internal inodes. The old return values due to the conditional assignment
are handled via open_xa_root, which now returns EOPNOTSUPP as the VFS
would have done.
Link: https://lore.kernel.org/r/20191024143127.17509-1-jeffm@suse.com
CC: stable@vger.kernel.org
Fixes: d0a5b995a308 ("vfs: Add IOP_XATTR inode operations flag")
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/reiserfs/reiserfs.h')
-rw-r--r-- | fs/reiserfs/reiserfs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/reiserfs/reiserfs.h b/fs/reiserfs/reiserfs.h index e5ca9ed79e54..726580114d55 100644 --- a/fs/reiserfs/reiserfs.h +++ b/fs/reiserfs/reiserfs.h @@ -1168,6 +1168,8 @@ static inline int bmap_would_wrap(unsigned bmap_nr) return bmap_nr > ((1LL << 16) - 1); } +extern const struct xattr_handler *reiserfs_xattr_handlers[]; + /* * this says about version of key of all items (but stat data) the * object consists of |