UBUNTU: SAUCE: overlayfs -- fs: limit filesystem stacking depth
authorMiklos Szeredi <mszeredi@suse.cz>
Thu, 4 Aug 2011 11:56:28 +0000 (13:56 +0200)
committerLeann Ogasawara <leann.ogasawara@canonical.com>
Mon, 2 Apr 2012 20:10:05 +0000 (13:10 -0700)
commit2ac7be3b9c385d2a0a8e85dbe4b87fbdb19740a2
treef8dfe0cfb8c07613c99cdb003fa30998aa46d6cc
parent10068dcf8b529be3bd08cd8dd24154a70d9d5233
UBUNTU: SAUCE: overlayfs -- fs: limit filesystem stacking depth

Add a simple read-only counter to super_block that indicates deep this
is in the stack of filesystems.  Previously ecryptfs was the only
stackable filesystem and it explicitly disallowed multiple layers of
itself.

Overlayfs, however, can be stacked recursively and also may be stacked
on top of ecryptfs or vice versa.

To limit the kernel stack usage we must limit the depth of the
filesystem stack.  Initially the limit is set to 2.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
fs/ecryptfs/main.c
fs/overlayfs/super.c
include/linux/fs.h