ovl: check that upperdir path is not on a read-only mount
Amir Goldstein
maintainerPATCH 1/1 ovl: check that upperdir path is not on a read-only mount
So far we only checked that sb is not read-only.
Suggested-by Christian Brauner <[email protected]>
Signed-off-by Amir Goldstein <[email protected]>
--- fs/overlayfs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/overlayfs/super.c +2 -2
@@ -1185,8 +1185,8 @@ static int ovl_get_upper(struct super_block *sb, struct ovl_fs *ofs,if (err) goto out; -/* Upper fs should not be r/o */ -if (sb_rdonly (upperpath->mnt->mnt_sb)) { +/* Upperdir path should not be r/o */ +if (__mnt_is_readonly (upperpath->mnt)) {pr_err ("upper fs is r/o, try multi-lower layers mount\n" ); err = -EINVAL ; goto out;
Signature · 1 line
2.30.0
Miklos Szeredi
maintainerQuoted 2 lines · Amir Goldstein
So far we only checked that sb is not read-only.
Makes sense, applied.
Thanks,
Miklos