Messages in this thread Patch in this message | | | From | Andy Whitcroft <> | Subject | [RFC PATCH 1/2] ovl: ovl_copy_up_xattr may fail when the upper filesystem does not support the same xattrs | Date | Thu, 6 Sep 2012 16:56:33 +0100 |
| |
When the upper filesystem does not support the same extended attribute families as the lower filesystem attempts to copy these xattrs up will fail EOPNOTSUPP. This is tickled by NFS which stores access information in an NFS specific prefix. Ignore failures to set these attributes.
BugLink: http://bugs.launchpad.net/bugs/1039402 Signed-off-by: Andy Whitcroft <apw@canonical.com> --- fs/overlayfs/copy_up.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c index 87dbeee..b0b4229 100644 --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c @@ -58,7 +58,14 @@ static int ovl_copy_up_xattr(struct dentry *old, struct dentry *new) goto out_free_value; } error = vfs_setxattr(new, name, value, size, 0); - if (error) + /* + * It is possible that the upper filesystem does not + * support the same xattrs as the lower filesystem. Ignore + * unsupported types. + */ + if (error == -EOPNOTSUPP) + error = 0; + else if (error) goto out_free_value; } -- 1.7.9.5
| |