linux-stable-rt/net
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
..
802
8021q
appletalk
atm [ATM]: fix broken uses of NIPQUAD in net/atm 2006-06-20 03:27:27 -07:00
ax25
bluetooth
bridge [BRIDGE]: Add support for NETIF_F_HW_CSUM devices 2006-06-17 22:06:45 -07:00
core [ETHTOOL]: Fix UFO typo 2006-06-17 23:00:20 -07:00
dccp
decnet [NET]: Clean up skb_linearize 2006-06-17 21:30:16 -07:00
econet
ethernet
ieee80211
ipv4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband 2006-06-19 19:01:59 -07:00
ipv6 [IPV6]: Sum real space for RTAs. 2006-06-17 22:48:48 -07:00
ipx [IPX]: Endian bug in ipxrtr_route_packet() 2006-06-17 21:30:24 -07:00
irda [IRDA]: Use put_unaligned() in irlmp_do_discovery(). 2006-06-17 22:16:13 -07:00
key [LSM-IPsec]: SELinux Authorize 2006-06-17 21:29:45 -07:00
lapb
llc [LLC]: Fix double receive of SKB. 2006-06-17 21:29:19 -07:00
netfilter [NETFILTER]: xt_sctp: fix endless loop caused by 0 chunk length 2006-06-19 23:39:45 -07:00
netlink
netrom
packet
rose
rxrpc
sched [NET]: Prevent multiple qdisc runs 2006-06-19 23:57:59 -07:00
sctp [SCTP]: sctp_unpack_cookie() fix 2006-06-20 03:26:14 -07:00
sunrpc [PATCH] VFS: Permit filesystem to override root dentry on mount 2006-06-23 07:42:45 -07:00
tipc
unix
wanrouter
x25
xfrm [NET]: Fix warnings after LSM-IPSEC changes. 2006-06-17 21:29:49 -07:00
Kconfig [SECMARK]: Add secmark support to core networking. 2006-06-17 21:29:57 -07:00
Makefile
TUNABLE
compat.c
nonet.c
socket.c [PATCH] VFS: Permit filesystem to override root dentry on mount 2006-06-23 07:42:45 -07:00
sysctl_net.c