lkml.org 
[lkml]   [2012]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 1/2] ovl: ovl_copy_up_xattr may fail when the upper filesystem does not support the same xattrs
Date
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


\
 
 \ /
  Last update: 2012-09-07 07:04    [W:0.047 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site