linux-hardened/fs/ext3
David Howells 454e2398be [PATCH] VFS: Permit filesystem to override root dentry on mount
Extend the get_sb() filesystem operation to take an extra argument that
permits the VFS to pass in the target vfsmount that defines the mountpoint.

The filesystem is then required to manually set the superblock and root dentry
pointers.  For most filesystems, this should be done with simple_set_mnt()
which will set the superblock pointer and then set the root dentry to the
superblock's s_root (as per the old default behaviour).

The get_sb() op now returns an integer as there's now no need to return the
superblock pointer.

This patch permits a superblock to be implicitly shared amongst several mount
points, such as can be done with NFS to avoid potential inode aliasing.  In
such a case, simple_set_mnt() would not be called, and instead the mnt_root
and mnt_sb would be set directly.

The patch also makes the following changes:

 (*) the get_sb_*() convenience functions in the core kernel now take a vfsmount
     pointer argument and return an integer, so most filesystems have to change
     very little.

 (*) If one of the convenience function is not used, then get_sb() should
     normally call simple_set_mnt() to instantiate the vfsmount. This will
     always return 0, and so can be tail-called from get_sb().

 (*) generic_shutdown_super() now calls shrink_dcache_sb() to clean up the
     dcache upon superblock destruction rather than shrink_dcache_anon().

     This is required because the superblock may now have multiple trees that
     aren't actually bound to s_root, but that still need to be cleaned up. The
     currently called functions assume that the whole tree is rooted at s_root,
     and that anonymous dentries are not the roots of trees which results in
     dentries being left unculled.

     However, with the way NFS superblock sharing are currently set to be
     implemented, these assumptions are violated: the root of the filesystem is
     simply a dummy dentry and inode (the real inode for '/' may well be
     inaccessible), and all the vfsmounts are rooted on anonymous[*] dentries
     with child trees.

     [*] Anonymous until discovered from another tree.

 (*) The documentation has been adjusted, including the additional bit of
     changing ext2_* into foo_* in the documentation.

[akpm@osdl.org: convert ipath_fs, do other stuff]
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Nathan Scott <nathans@sgi.com>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-23 07:42:45 -07:00
..
acl.c [PATCH] Fix two ext[23] uninitialized warnings 2006-02-03 08:32:05 -08:00
acl.h [PATCH] remove <linux/xattr_acl.h> 2005-06-23 09:45:33 -07:00
balloc.c [PATCH] ext3_get_blocks: Adjust reservation window size for mblocks 2006-03-26 08:57:01 -08:00
bitmap.c [PATCH] ext3: Fix debug logging-only compilation error 2006-03-25 08:22:56 -08:00
dir.c [RBTREE] Update ext3 to use rb_parent() accessor macro. 2006-04-21 13:15:57 +01:00
file.c [PATCH] Introduce sys_splice() system call 2006-03-30 12:28:18 -08:00
fsync.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hash.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ialloc.c [PATCH] fs/ext3/: small cleanups 2006-01-10 08:01:56 -08:00
inode.c [PATCH] ext3: multile block allocate little endian fixes 2006-05-03 20:05:41 -07:00
ioctl.c [PATCH] protect ext3 ioctl modifying append_only, immutable, etc. with i_mutex 2006-04-26 07:52:21 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
namei.c [PATCH] ext3: ext3_symlink should use GFP_NOFS allocations inside 2006-03-11 09:19:34 -08:00
namei.h [PATCH] ext3: sparse fixes 2005-10-30 17:37:25 -08:00
resize.c [PATCH] ext3 resize: fix double unlock_super() 2006-05-31 16:27:10 -07:00
super.c [PATCH] VFS: Permit filesystem to override root dentry on mount 2006-06-23 07:42:45 -07:00
symlink.c Fix nasty ncpfs symlink handling bug. 2005-08-19 18:02:56 -07:00
xattr.c [PATCH] remove ext3 xattr permission checks 2006-01-10 08:01:30 -08:00
xattr.h [PATCH] ext3: Enable atomic inode security labeling 2005-09-09 13:57:28 -07:00
xattr_security.c [PATCH] ext3: Enable atomic inode security labeling 2005-09-09 13:57:28 -07:00
xattr_trusted.c [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
xattr_user.c [PATCH] remove ext3 xattr permission checks 2006-01-10 08:01:30 -08:00