Whamcloud - gitweb
LU-18088 osd: use __vfs_getxattr 17/55917/4
authorVladimir Saveliev <vladimir.saveliev@hpe.com>
Fri, 8 Dec 2023 16:55:57 +0000 (19:55 +0300)
committerOleg Drokin <green@whamcloud.com>
Fri, 23 Aug 2024 22:01:42 +0000 (22:01 +0000)
commit215f1905cbaa0fadd6dee682c1f9c3782288c08c
tree898235fb95290d746b5b1b3bb3416a252ec538e2
parentf89065d6f2205b413a4fe2ac64c7eee0e447f2f6
LU-18088 osd: use __vfs_getxattr

vfs_getxattr() is not suitable for osd. To get security xattr it goes
via:

vfs_getxattr
  xattr_getsecurity
    security_inode_getsecurity
      cap_inode_getsecurity
        dentry = d_find_any_alias(inode)
          if (!dentry)
            return -EINVAL;
and return -EINVAL because osd object inodes have empty alias list.

Use __vfs_getxattr() instead.

Fixes: b9ef5d1e7f7 ("LU-17546 osd: use __vfs_removexattr")
HPE-bug-id: LUS-12018
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: I71ed0141ebf5124d4ff0862c24fd719f29d883ae
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55917
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
lustre/include/lustre_compat.h
lustre/tests/sanity-sec.sh