aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLeann Ogasawara <leann.ogasawara@canonical.com>2011-08-15 13:04:12 -0700
committerLinaro CI <john.rigby@linaro.org>2011-12-15 23:34:57 +0000
commitad28e9749d1b3fac515a745ba3250ff075af24cf (patch)
tree2ce2a1443b373eb68db41a60dba364b5d87710d1 /fs
parent12c41435cfdcacc25381a745b3b2949f9b915430 (diff)
Revert "UBUNTU: ubuntu: overlayfs -- ovl: fix overlayfs over overlayfs"
This reverts commit 2679353c90924972d3bbe1328042d7e88a794d62.
Diffstat (limited to 'fs')
-rw-r--r--fs/overlayfs/inode.c11
-rw-r--r--fs/overlayfs/super.c4
2 files changed, 1 insertions, 14 deletions
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index ce39fab84ec..289006e8d49 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -90,18 +90,9 @@ int ovl_permission(struct inode *inode, int mask, unsigned int flags)
/*
* Writes will always be redirected to upper layer, so
* ignore lower layer being read-only.
- *
- * If the overlay itself is read-only then proceed
- * with the permission check, don't return EROFS.
- * This will only happen if this is the lower layer of
- * another overlayfs.
- *
- * If upper fs becomes read-only after the overlay was
- * constructed return EROFS to prevent modification of
- * upper layer.
*/
err = -EROFS;
- if (is_upper && !IS_RDONLY(inode) && IS_RDONLY(realinode) &&
+ if (is_upper && IS_RDONLY(realinode) &&
(S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)))
goto out_dput;
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index c741b17835a..7109b45a171 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -548,10 +548,6 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
goto out_put_upper_mnt;
}
- /* If the upper fs is r/o, we mark overlayfs r/o too */
- if (ufs->upper_mnt->mnt_sb->s_flags & MS_RDONLY)
- sb->s_flags |= MS_RDONLY;
-
if (!(sb->s_flags & MS_RDONLY)) {
err = mnt_want_write(ufs->upper_mnt);
if (err)