From: Jordi Pujol <jordipujolp@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel@vger.kernel.org, Michal Suchanek <hramrach@centrum.cz>
Subject: Re: overlayfs: mounting overlayfs on top of overlayfs
Date: Mon, 6 Jun 2011 20:29:24 +0200 [thread overview]
Message-ID: <201106062029.25279.jordipujolp@gmail.com> (raw)
In-Reply-To: <201106040823.25072.jordipujolp@gmail.com>
[-- Attachment #1: Type: Text/Plain, Size: 143 bytes --]
Hello,
The attached patch solves the problem,
Thanks,
Jordi Pujol
Live never ending Tale
GNU/Linux Live forever!
http://livenet.selfip.com
[-- Attachment #2: 53-mount-on-top-readonly-mount.patch --]
[-- Type: text/x-patch, Size: 730 bytes --]
overlayfs v10:
- Test for readonly using the vfsmount superblock
from the main filesystem.
- Ignore WRITE request for the real filesystems.
Signed-off-by: Jordi Pujol <jordipujolp@gmail.com>
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c 2011-06-05 10:06:25.323823937 +0200
@@ -54,6 +54,9 @@ int ovl_permission(struct inode *inode,
bool is_upper;
int err;
+ if (mask & MAY_WRITE && IS_RDONLY(inode))
+ return -EROFS;
+
if (S_ISDIR(inode->i_mode)) {
oe = inode->i_private;
} else if (flags & IPERM_FLAG_RCU) {
@@ -102,6 +105,8 @@ int ovl_permission(struct inode *inode,
err = -EACCES;
if (IS_IMMUTABLE(realinode))
goto out_dput;
+
+ mask &= ~MAY_WRITE;
}
if (realinode->i_op->permission)
next prev parent reply other threads:[~2011-06-06 18:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-03 13:29 overlayfs: mounting overlayfs on top of overlayfs Jordi Pujol
2011-06-04 6:23 ` Jordi Pujol
2011-06-06 18:29 ` Jordi Pujol [this message]
2011-06-07 8:08 ` Miklos Szeredi
2011-06-07 13:00 ` Jordi Pujol
2011-06-08 15:06 ` Miklos Szeredi
2011-06-10 6:46 ` Jordi Pujol
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=201106062029.25279.jordipujolp@gmail.com \
--to=jordipujolp@gmail.com \
--cc=hramrach@centrum.cz \
--cc=linux-fsdevel@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).