[PATCH] ovl: fix nested overlayfs mount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The introduction of overlayfs features broke nested mounting
of overlayfs as lowerdir of another overlayfs mount.

When the upper overlayfs checks overlayfs features xattr
on the underlying overlayfs mount, it gets -EPERM and aborts.

Fix this by returning -ENODATA instead of -EPERM from
ovl_own_xattr_get().  This behavior is consistent with the
behavior of ovl_listxattr(), which filters out the private
overlayfs xattrs.

Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
---
 fs/overlayfs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index 625fa705..9815f1b 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -592,7 +592,7 @@ static int ovl_own_xattr_get(const struct xattr_handler *handler,
 			     struct dentry *dentry, struct inode *inode,
 			     const char *name, void *buffer, size_t size)
 {
-	return -EPERM;
+	return -ENODATA;
 }
 
 static int ovl_own_xattr_set(const struct xattr_handler *handler,
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux