From b3c5473ce74a6600aaa6938de81d91f099b1f1bf Mon Sep 17 00:00:00 2001 From: Bruno Faccini Date: Mon, 3 Jun 2024 16:47:51 +0200 Subject: [PATCH] LU-17900 llite: handle AT_GETATTR_NOSEC flag if present 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 Change-Id: I1d041913a6fc3ab9158fd611cb7d14dd1b7f694b Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55296 Reviewed-by: Andreas Dilger Reviewed-by: Aurelien Degremont Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lustre/include/lustre_compat.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lustre/include/lustre_compat.h b/lustre/include/lustre_compat.h index 99d6c8e..7c547a7 100644 --- a/lustre/include/lustre_compat.h +++ b/lustre/include/lustre_compat.h @@ -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); -- 1.8.3.1