linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-unionfs@vger.kernel.org
Subject: [PATCH] ovl: fix nested overlayfs mount
Date: Wed, 16 Nov 2016 11:22:39 +0200	[thread overview]
Message-ID: <1479288159-20396-1-git-send-email-amir73il@gmail.com> (raw)

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

             reply	other threads:[~2016-11-16  9:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16  9:22 Amir Goldstein [this message]
2016-11-16  9:28 ` [PATCH] ovl: fix nested overlayfs mount Miklos Szeredi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479288159-20396-1-git-send-email-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).