Messages in this thread Patch in this message | | | Subject | [PATCH 10/28] VFS: Move next_mnt() | Date | Mon, 25 Oct 2004 10:43:32 -0400 | From | Mike Waychison <> |
| |
This patch simply moves next_mnt in preparation for the next patch that implements detachable subtrees.
Signed-off-by: Mike Waychison <michael.waychison@sun.com> ---
namespace.c | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-)
Index: linux-2.6.9-quilt/fs/namespace.c =================================================================== --- linux-2.6.9-quilt.orig/fs/namespace.c 2004-10-22 17:17:37.770722120 -0400 +++ linux-2.6.9-quilt/fs/namespace.c 2004-10-22 17:17:38.338635784 -0400 @@ -121,6 +121,22 @@ static inline int check_mnt(struct vfsmo return mnt->mnt_namespace == current->namespace; } +static struct vfsmount *next_mnt(struct vfsmount *p, struct vfsmount *root) +{ + struct list_head *next = p->mnt_mounts.next; + if (next == &p->mnt_mounts) { + while (1) { + if (p == root) + return NULL; + next = p->mnt_child.next; + if (next != &p->mnt_parent->mnt_mounts) + break; + p = p->mnt_parent; + } + } + return list_entry(next, struct vfsmount, mnt_child); +} + static void detach_mnt(struct vfsmount *mnt, struct nameidata *old_nd) { old_nd->dentry = mnt->mnt_mountpoint; @@ -141,22 +157,6 @@ static void attach_mnt(struct vfsmount * nd->dentry->d_mounted++; } -static struct vfsmount *next_mnt(struct vfsmount *p, struct vfsmount *root) -{ - struct list_head *next = p->mnt_mounts.next; - if (next == &p->mnt_mounts) { - while (1) { - if (p == root) - return NULL; - next = p->mnt_child.next; - if (next != &p->mnt_parent->mnt_mounts) - break; - p = p->mnt_parent; - } - } - return list_entry(next, struct vfsmount, mnt_child); -} - /* this expects the caller to hold vfsmount_lock */ static int can_expire(struct vfsmount *root, int offset) { - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |