* [PATCH] ovl: fix nested overlayfs mount
@ 2016-11-16 9:22 Amir Goldstein
2016-11-16 9:28 ` Miklos Szeredi
0 siblings, 1 reply; 2+ messages in thread
From: Amir Goldstein @ 2016-11-16 9:22 UTC (permalink / raw)
To: Miklos Szeredi; +Cc: linux-unionfs
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@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ovl: fix nested overlayfs mount
2016-11-16 9:22 [PATCH] ovl: fix nested overlayfs mount Amir Goldstein
@ 2016-11-16 9:28 ` Miklos Szeredi
0 siblings, 0 replies; 2+ messages in thread
From: Miklos Szeredi @ 2016-11-16 9:28 UTC (permalink / raw)
To: Amir Goldstein; +Cc: linux-unionfs@vger.kernel.org
On Wed, Nov 16, 2016 at 10:22 AM, Amir Goldstein <amir73il@gmail.com> wrote:
> 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.
Yes, it makes sense regardless of the features xattr.
Applied.
Thanks,
Miklos
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-16 9:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-16 9:22 [PATCH] ovl: fix nested overlayfs mount Amir Goldstein
2016-11-16 9:28 ` Miklos Szeredi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).