Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756917AbXI0OJ5 (ORCPT ); Thu, 27 Sep 2007 10:09:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755976AbXI0OJp (ORCPT ); Thu, 27 Sep 2007 10:09:45 -0400 Received: from ns2.suse.de ([195.135.220.15]:55076 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755254AbXI0OJo (ORCPT ); Thu, 27 Sep 2007 10:09:44 -0400 Message-Id: <20070927141227.762624002@X40.localnet> References: <20070927141200.820970144@X40.localnet> User-Agent: quilt/0.46-62.1 Date: Thu, 27 Sep 2007 16:12:03 +0200 From: jblunck@suse.de To: linux-kernel@vger.kernel.org Cc: viro@zeniv.linux.org.uk, hch@lst.de, agruen@suse.de, tiwai@suse.de Subject: [patch 03/10] Remove path_release_on_umount() Content-Disposition: inline; filename=remove-path_release_on_umount.diff Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2202 Lines: 66 path_release_on_umount() should only be called from sys_umount(). I merged the function into sys_umount() instead of having in in namei.c. Signed-off-by: Jan Blunck --- fs/namei.c | 10 ---------- fs/namespace.c | 4 +++- include/linux/namei.h | 1 - 3 files changed, 3 insertions(+), 12 deletions(-) Index: b/fs/namei.c =================================================================== --- a/fs/namei.c +++ b/fs/namei.c @@ -353,16 +353,6 @@ void path_release(struct nameidata *nd) mntput(nd->mnt); } -/* - * umount() mustn't call path_release()/mntput() as that would clear - * mnt_expiry_mark - */ -void path_release_on_umount(struct nameidata *nd) -{ - dput(nd->dentry); - mntput_no_expire(nd->mnt); -} - /** * release_open_intent - free up open intent resources * @nd: pointer to nameidata Index: b/fs/namespace.c =================================================================== --- a/fs/namespace.c +++ b/fs/namespace.c @@ -648,7 +648,9 @@ asmlinkage long sys_umount(char __user * retval = do_umount(nd.mnt, flags); dput_and_out: - path_release_on_umount(&nd); + /* we mustn't call path_put() as that would clear mnt_expiry_mark */ + dput(nd.dentry); + mntput_no_expire(nd.mnt); out: return retval; } Index: b/include/linux/namei.h =================================================================== --- a/include/linux/namei.h +++ b/include/linux/namei.h @@ -72,7 +72,6 @@ extern int FASTCALL(path_lookup(const ch extern int vfs_path_lookup(struct dentry *, struct vfsmount *, const char *, unsigned int, struct nameidata *); extern void path_release(struct nameidata *); -extern void path_release_on_umount(struct nameidata *); extern int __user_path_lookup_open(const char __user *, unsigned lookup_flags, struct nameidata *nd, int open_flags); extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags); -- - 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/