Whamcloud - gitweb
LU-17546 osd: use __vfs_removexattr 72/54072/12
authorAlex Zhuravlev <bzzz@whamcloud.com>
Fri, 16 Feb 2024 05:31:41 +0000 (08:31 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 2 Apr 2024 21:01:54 +0000 (21:01 +0000)
as otherwise vfs_removexattr() taking inode's lock confict with
osd_execute_truncate() while we don't really need inode's lock
because another per-object lock has been already taken.

Fixes: dcd5607ce0 ("LU-13430 vfs: add ll_vfs_getxattr/ll_vfs_setxattr compat macro")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I43c1c60d2a9f911b6395e1b7546507074a90b1cf
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54072
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/lustre_compat.h

index 002ad7a..8cf7e5b 100644 (file)
@@ -559,7 +559,7 @@ static inline int ll_vfs_setxattr(struct dentry *dentry, struct inode *inode,
                                  const void *value, size_t size, int flags)
 {
 #if defined(HAVE_MNT_IDMAP_ARG) || defined(HAVE_USER_NAMESPACE_ARG)
-       return vfs_setxattr(&nop_mnt_idmap, dentry, name,
+       return __vfs_setxattr(&nop_mnt_idmap, dentry, inode, name,
                            VFS_SETXATTR_VALUE(value), size, flags);
 #elif defined(HAVE_VFS_SETXATTR)
        return __vfs_setxattr(dentry, inode, name, value, size, flags);
@@ -575,7 +575,7 @@ static inline int ll_vfs_removexattr(struct dentry *dentry, struct inode *inode,
                                     const char *name)
 {
 #if defined(HAVE_MNT_IDMAP_ARG) || defined(HAVE_USER_NAMESPACE_ARG)
-       return vfs_removexattr(&nop_mnt_idmap, dentry, name);
+       return __vfs_removexattr(&nop_mnt_idmap, dentry, name);
 #elif defined(HAVE_VFS_SETXATTR)
        return __vfs_removexattr(dentry, name);
 #else