From: Christian Brauner Date: Wed, 1 Feb 2023 13:15:00 +0000 (+0100) Subject: ovl: check for ->listxattr() support X-Git-Tag: v6.6.7~3060^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a1fbb607340d49f208e90cc0d7bdfff2141cce8d;p=platform%2Fkernel%2Flinux-starfive.git ovl: check for ->listxattr() support We have decoupled vfs_listxattr() from IOP_XATTR. Instead we just need to check whether inode->i_op->listxattr is implemented. Cc: linux-unionfs@vger.kernel.org Signed-off-by: Christian Brauner (Microsoft) --- diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c index c14e907..f658cc8 100644 --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c @@ -81,8 +81,7 @@ int ovl_copy_xattr(struct super_block *sb, const struct path *oldpath, struct de int error = 0; size_t slen; - if (!(old->d_inode->i_opflags & IOP_XATTR) || - !(new->d_inode->i_opflags & IOP_XATTR)) + if (!old->d_inode->i_op->listxattr || !new->d_inode->i_op->listxattr) return 0; list_size = vfs_listxattr(old, NULL, 0);