[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1346946994-21286-2-git-send-email-apw@canonical.com>
Date: Thu, 6 Sep 2012 16:56:33 +0100
From: Andy Whitcroft <apw@...onical.com>
To: Miklos Szeredi <miklos@...redi.hu>,
Andy Whitcroft <apw@...onical.com>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
mszeredi@...e.cz
Subject: [RFC PATCH 1/2] ovl: ovl_copy_up_xattr may fail when the upper filesystem does not support the same xattrs
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@...onical.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists