Skip to content

Commit

Permalink
ovl: check for ->listxattr() support
Browse files Browse the repository at this point in the history
We have decoupled vfs_listxattr() from IOP_XATTR. Instead we just need
to check whether inode->i_op->listxattr is implemented.

Cc: [email protected]
Signed-off-by: Christian Brauner (Microsoft) <[email protected]>
  • Loading branch information
brauner committed Mar 6, 2023
1 parent d9f892b commit a1fbb60
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/overlayfs/copy_up.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a1fbb60

Please sign in to comment.