linux-sg2042/fs/overlayfs
Miklos Szeredi cc6f67bcaf ovl: mount read-only if workdir can't be created
OpenWRT folks reported that overlayfs fails to mount if upper fs is full,
because workdir can't be created.  Wordir creation can fail for various
other reasons too.

There's no reason that the mount itself should fail, overlayfs can work
fine without a workdir, as long as the overlay isn't modified.

So mount it read-only and don't allow remounting read-write.

Add a couple of WARN_ON()s for the impossible case of workdir being used
despite being read-only.

Reported-by: Bastian Bittorf <bittorf@bluebottle.com> 
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: <stable@vger.kernel.org> # v3.18+
2015-05-19 14:30:12 +02:00
..
Kconfig ovl: rename filesystem type to "overlay" 2014-11-20 16:39:59 +01:00
Makefile ovl: rename filesystem type to "overlay" 2014-11-20 16:39:59 +01:00
copy_up.c ovl: mount read-only if workdir can't be created 2015-05-19 14:30:12 +02:00
dir.c ovl: mount read-only if workdir can't be created 2015-05-19 14:30:12 +02:00
inode.c ovl: Use macros to present ovl_xattr 2014-12-13 00:59:52 +01:00
overlayfs.h ovl: Use macros to present ovl_xattr 2014-12-13 00:59:52 +01:00
readdir.c Merge branch 'overlayfs-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs into for-next 2015-02-20 04:58:52 -05:00
super.c ovl: mount read-only if workdir can't be created 2015-05-19 14:30:12 +02:00