public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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()
Date: Thu, 27 Sep 2007 16:12:03 +0200	[thread overview]
Message-ID: <20070927141227.762624002@X40.localnet> (raw)
In-Reply-To: 20070927141200.820970144@X40.localnet

[-- Attachment #1: remove-path_release_on_umount.diff --]
[-- Type: text/plain, Size: 1958 bytes --]

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 <jblunck@suse.de>
---
 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);

-- 


  parent reply	other threads:[~2007-09-27 14:09 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-27 14:12 [patch 00/10] Use struct path in struct nameidata jblunck
2007-09-27 14:12 ` [patch 01/10] Dont touch fs_struct in drivers jblunck
2007-09-28 18:33   ` Christoph Hellwig
2007-09-27 14:12 ` [patch 02/10] Dont touch fs_struct in usermodehelper jblunck
2007-09-27 17:46   ` Greg KH
2007-09-27 20:39     ` Christoph Hellwig
2007-09-27 21:36       ` Greg KH
2007-09-28 18:33   ` Christoph Hellwig
2007-09-27 14:12 ` jblunck [this message]
2007-09-28 18:34   ` [patch 03/10] Remove path_release_on_umount() Christoph Hellwig
2007-09-27 14:12 ` [patch 04/10] Move struct path into its own header jblunck
2007-09-28 18:35   ` Christoph Hellwig
2007-09-27 14:12 ` [patch 05/10] Embed a struct path into struct nameidata instead of nd->{dentry,mnt} jblunck
2007-09-28 18:36   ` Christoph Hellwig
2007-09-27 14:12 ` [patch 06/10] Introduce path_put() jblunck
2007-09-28 18:37   ` Christoph Hellwig
2007-09-27 14:12 ` [patch 07/10] Use path_put() in a few places instead of {mnt,d}put() jblunck
2007-09-28 18:37   ` Christoph Hellwig
2007-09-27 14:12 ` [patch 08/10] Introduce path_get() jblunck
2007-09-28 18:40   ` Christoph Hellwig
2007-09-27 14:12 ` [patch 09/10] Use struct path in fs_struct jblunck
2007-09-28 18:42   ` Christoph Hellwig
2007-09-28 20:39     ` Andreas Gruenbacher
2007-09-29  9:24       ` Christoph Hellwig
2007-09-29  9:31         ` Christoph Hellwig
2007-09-27 14:12 ` [patch 10/10] Make set_fs_{root,pwd} take a struct path jblunck
2007-09-28 18:42   ` Christoph Hellwig
2007-09-28 20:43 ` [patch] Combine path_put and path_put_conditional Andreas Gruenbacher
2007-09-29  9:25   ` Christoph Hellwig
2007-09-29 12:36   ` Jan Blunck
2007-09-29 22:21   ` Ingo Oeser
2007-10-09  9:16 ` [patch 00/10] Use struct path in struct nameidata Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2007-10-09 18:05 Jan Blunck
2007-10-09 18:05 ` [patch 03/10] Remove path_release_on_umount() Jan Blunck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070927141227.762624002@X40.localnet \
    --to=jblunck@suse.de \
    --cc=agruen@suse.de \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox