Messages in this thread Patch in this message | | | From | Andy Whitcroft <> | Subject | [PATCH 2/2] overlayfs: ovl_copy_up_xattr -- handle EOPNOTSUPP from vfs_listxattr | Date | Wed, 17 Nov 2010 17:37:04 +0000 |
| |
Even when an underlying filesystem had a getxattr op it may not support xattrs. In this case vfs_listxattr will return EOPNOTSUPP. Handle this return when copying up attributes.
Signed-off-by: Andy Whitcroft <apw@canonical.com> --- fs/overlayfs/overlayfs.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/fs/overlayfs/overlayfs.c b/fs/overlayfs/overlayfs.c index 6b8a7b9..1148b8c 100644 --- a/fs/overlayfs/overlayfs.c +++ b/fs/overlayfs/overlayfs.c @@ -692,8 +692,11 @@ static int ovl_copy_up_xattr(struct dentry *old, struct dentry *new) return 0; list_size = vfs_listxattr(old, NULL, 0); - if (list_size <= 0) + if (list_size <= 0) { + if (list_size == -EOPNOTSUPP) + return 0; return list_size; + } buf = kzalloc(list_size, GFP_KERNEL); if (!buf) -- 1.7.0.4
| |