]> git.baikalelectronics.ru Git - kernel.git/commit
reiserfs: fix extended attributes on the root directory
authorJeff Mahoney <jeffm@suse.com>
Thu, 24 Oct 2019 14:31:27 +0000 (10:31 -0400)
committerJan Kara <jack@suse.cz>
Thu, 31 Oct 2019 14:39:24 +0000 (15:39 +0100)
commit26b008d49837f9615d87fd1f714be23932ba8338
tree1ed799d293f5d1c71bd21207430da9b7add2ca75
parent1e20f13c400e6df62ae1c926f6b320f0b5016ff8
reiserfs: fix extended attributes on the root directory

Since commit 06c3e3fd1bfc (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: 06c3e3fd1bfc ("vfs: Add IOP_XATTR inode operations flag")
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/reiserfs/inode.c
fs/reiserfs/namei.c
fs/reiserfs/reiserfs.h
fs/reiserfs/super.c
fs/reiserfs/xattr.c
fs/reiserfs/xattr_acl.c