($INBOX_DIR/description missing)
 help / color / Atom feed
* [PATCH] ovl: check that upperdir path is not on a read-only mount
@ 2021-04-08 11:30 Amir Goldstein
  2021-04-09  8:04 ` Miklos Szeredi
  0 siblings, 1 reply; 2+ messages in thread
From: Amir Goldstein @ 2021-04-08 11:30 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: Christian Brauner, linux-unionfs

So far we only checked that sb is not read-only.

Suggested-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
 fs/overlayfs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index fdd72f1a9c5e..8d8366350093 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -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;
-- 
2.30.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ovl: check that upperdir path is not on a read-only mount
  2021-04-08 11:30 [PATCH] ovl: check that upperdir path is not on a read-only mount Amir Goldstein
@ 2021-04-09  8:04 ` Miklos Szeredi
  0 siblings, 0 replies; 2+ messages in thread
From: Miklos Szeredi @ 2021-04-09  8:04 UTC (permalink / raw)
  To: Amir Goldstein; +Cc: Christian Brauner, overlayfs

On Thu, Apr 8, 2021 at 1:30 PM Amir Goldstein <amir73il@gmail.com> wrote:
>
> So far we only checked that sb is not read-only.

Makes sense, applied.

Thanks,
Miklos

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08 11:30 [PATCH] ovl: check that upperdir path is not on a read-only mount Amir Goldstein
2021-04-09  8:04 ` Miklos Szeredi

($INBOX_DIR/description missing)

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-unionfs/0 linux-unionfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-unionfs linux-unionfs/ https://lore.kernel.org/linux-unionfs \
		linux-unionfs@vger.kernel.org
	public-inbox-index linux-unionfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-unionfs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git