aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-06-25 12:55:28 +0100
committerZiyan <jaraidaniel@gmail.com>2016-04-03 14:55:51 +0200
commitbc9600bb91c52252e67c163606ca57fbf0c369b3 (patch)
tree3ccdbef9f842f9adb1f06aea8498db894172a2a3 /fs/namespace.c
parent14df004d01cf1e919471fdf32cf97e7a7169178b (diff)
downloadkernel_samsung_tuna-bc9600bb91c52252e67c163606ca57fbf0c369b3.tar.gz
kernel_samsung_tuna-bc9600bb91c52252e67c163606ca57fbf0c369b3.tar.bz2
kernel_samsung_tuna-bc9600bb91c52252e67c163606ca57fbf0c369b3.zip
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> (cherry picked from commit f015f1267b23d3530d3f874243fb83cb5f443005)
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 040e00f6121..7df8bf94ddd 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -509,8 +509,20 @@ struct vfsmount *__lookup_mnt(struct vfsmount *mnt, struct dentry *dentry,
}
/*
- * lookup_mnt increments the ref count before returning
- * the vfsmount struct.
+ * lookup_mnt - Return the first child mount mounted at path
+ *
+ * "First" means first mounted chronologically. If you create the
+ * following mounts:
+ *
+ * mount /dev/sda1 /mnt
+ * mount /dev/sda2 /mnt
+ * mount /dev/sda3 /mnt
+ *
+ * Then lookup_mnt() on the base /mnt dentry in the root mount will
+ * return successively the root dentry and vfsmount of /dev/sda1, then
+ * /dev/sda2, then /dev/sda3, then NULL.
+ *
+ * lookup_mnt takes a reference to the found vfsmount.
*/
struct vfsmount *lookup_mnt(struct path *path)
{