Whamcloud - gitweb
LU-17900 llite: handle AT_GETATTR_NOSEC flag if present 96/55296/3
authorBruno Faccini <bfaccini@nvidia.com>
Mon, 3 Jun 2024 14:47:51 +0000 (16:47 +0200)
committerOleg Drokin <green@whamcloud.com>
Mon, 10 Jun 2024 06:09:31 +0000 (06:09 +0000)
Starting with v6.7-rc1-1-g8a924db2d7b5, a new AT_GETATTR_NOSEC
flag can be passed in addition by vfs_getattr_nosec() to the
underlying FS getattr() interface routine.
So it must be handled/masked in ll_vfs_getattr() in order to avoid
to pass it back to vfs_getattr(), like already done by
ecryptfs/overlayfs and thus no longer get a warning/stack displayed.

Signed-off-by: Bruno Faccini <bfaccini@nvidia.com>
Change-Id: I1d041913a6fc3ab9158fd611cb7d14dd1b7f694b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55296
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/lustre_compat.h

index 99d6c8e..7c547a7 100644 (file)
@@ -175,6 +175,11 @@ static inline int ll_vfs_getattr(struct path *path, struct kstat *st,
        int rc;
 
 #if defined(HAVE_USER_NAMESPACE_ARG) || defined(HAVE_INODEOPS_ENHANCED_GETATTR)
+#ifdef AT_GETATTR_NOSEC /* added in v6.7-rc1-1-g8a924db2d7b5 */
+       if (flags & AT_GETATTR_NOSEC)
+               rc = vfs_getattr_nosec(path, st, request_mask, flags);
+       else
+#endif /* AT_GETATTR_NOSEC */
        rc = vfs_getattr(path, st, request_mask, flags);
 #else
        rc = vfs_getattr(path, st);