aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-06-25 07:55:28 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-14 08:38:32 -0400
commitf015f1267b23d3530d3f874243fb83cb5f443005 (patch)
tree14db3794b2716614ee8acfaaad011d6fe7e6db44 /fs/namespace.c
parentbe34d1a3bc4b6f357a49acb55ae870c81337e4f0 (diff)
VFS: Comment mount following code
Add comments describing what the directions "up" and "down" mean and ref count handling to the VFS mount following family of functions. Signed-off-by: Valerie Aurora <vaurora@redhat.com> (Original author) Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index be1b07a774f1..c53d3381b0d0 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -515,8 +515,20 @@ struct mount *__lookup_mnt(struct vfsmount *mnt, struct dentry *dentry,
515} 515}
516 516
517/* 517/*
518 * lookup_mnt increments the ref count before returning 518 * lookup_mnt - Return the first child mount mounted at path
519 * the vfsmount struct. 519 *
520 * "First" means first mounted chronologically. If you create the
521 * following mounts:
522 *
523 * mount /dev/sda1 /mnt
524 * mount /dev/sda2 /mnt
525 * mount /dev/sda3 /mnt
526 *
527 * Then lookup_mnt() on the base /mnt dentry in the root mount will
528 * return successively the root dentry and vfsmount of /dev/sda1, then
529 * /dev/sda2, then /dev/sda3, then NULL.
530 *
531 * lookup_mnt takes a reference to the found vfsmount.
520 */ 532 */
521struct vfsmount *lookup_mnt(struct path *path) 533struct vfsmount *lookup_mnt(struct path *path)
522{ 534{