From mboxrd@z Thu Jan 1 00:00:00 1970 From: Trond Myklebust Subject: [PATCH attempt=2 1/5] VFS: Uninline the function put_mnt_ns() Date: Thu, 18 Jun 2009 14:57:31 -0700 Message-ID: <20090618215731.27808.9905.stgit@heimdal.trondhjem.org> References: <20090618215731.27808.82272.stgit@heimdal.trondhjem.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Al Viro , Linus Torvalds , Christoph Hellwig Return-path: In-Reply-To: <20090618215731.27808.82272.stgit-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org In order to allow modules to use it without having to export vfsmount_lock. Signed-off-by: Trond Myklebust --- fs/namespace.c | 10 +++++++++- include/linux/mnt_namespace.h | 9 +-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/fs/namespace.c b/fs/namespace.c index 2dd333b..1d4f2d8 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -2246,7 +2246,7 @@ void __init mnt_init(void) init_mount_tree(); } -void __put_mnt_ns(struct mnt_namespace *ns) +static void __put_mnt_ns(struct mnt_namespace *ns) { struct vfsmount *root = ns->root; LIST_HEAD(umount_list); @@ -2260,3 +2260,11 @@ void __put_mnt_ns(struct mnt_namespace *ns) release_mounts(&umount_list); kfree(ns); } + +void put_mnt_ns(struct mnt_namespace *ns) +{ + if (atomic_dec_and_lock(&ns->count, &vfsmount_lock)) + /* releases vfsmount_lock */ + __put_mnt_ns(ns); +} + diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h index 3a05929..299d11a 100644 --- a/include/linux/mnt_namespace.h +++ b/include/linux/mnt_namespace.h @@ -26,14 +26,7 @@ struct fs_struct; extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, struct fs_struct *); -extern void __put_mnt_ns(struct mnt_namespace *ns); - -static inline void put_mnt_ns(struct mnt_namespace *ns) -{ - if (atomic_dec_and_lock(&ns->count, &vfsmount_lock)) - /* releases vfsmount_lock */ - __put_mnt_ns(ns); -} +extern void put_mnt_ns(struct mnt_namespace *ns); static inline void exit_mnt_ns(struct task_struct *p) { -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html