[PATCH 05/10] ovl: suppress file handle support warnings on read-only mount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



An overlay mount with no upper layer (a.k.a ovl_force_readonly)
does not need an index, because there is no copy up, so there is
no reason to spew warnings about lower layer file handle support
for index=on.

Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
---
 fs/overlayfs/super.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index c88493b01d8d..6381e71b0d5d 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -922,6 +922,9 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
 	} else if (!ufs->config.upperdir && stacklen == 1) {
 		pr_err("overlayfs: at least 2 lowerdir are needed while upperdir nonexistent\n");
 		goto out_free_lowertmp;
+	} else if (!ufs->config.upperdir || !ufs->config.workdir) {
+		/* Read-only mount - skip file handle support checks */
+		ufs->config.index = false;
 	}
 
 	err = -ENOMEM;
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux