From: Jan Blunck <jblunck@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux-Kernel Mailinglist <linux-kernel@vger.kernel.org>,
Christoph Hellwig <hch@lst.de>,
Andreas Gruenbacher <agruen@suse.de>
Subject: [patch 03/10] Remove path_release_on_umount()
Date: Tue, 09 Oct 2007 20:05:06 +0200 [thread overview]
Message-ID: <20071009180512.524561417@X40.localnet> (raw)
In-Reply-To: 20071009180503.075306583@X40.localnet
[-- Attachment #1: vfs/remove-path_release_on_umount.diff --]
[-- Type: text/plain, Size: 1999 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>
Acked-by: Christoph Hellwig <hch@lst.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
@@ -368,16 +368,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
@@ -988,7 +988,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
@@ -73,7 +73,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);
--
next prev parent reply other threads:[~2007-10-09 18:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-09 18:05 [patch 00/10] Use struct path in struct nameidata Jan Blunck
2007-10-09 18:05 ` [patch 01/10] Dont touch fs_struct in drivers Jan Blunck
2007-10-09 18:05 ` [patch 02/10] Dont touch fs_struct in usermodehelper Jan Blunck
2007-10-09 18:05 ` Jan Blunck [this message]
2007-10-09 18:05 ` [patch 04/10] Move struct path into its own header Jan Blunck
2007-10-09 18:05 ` [patch 05/10] Embed a struct path into struct nameidata instead of nd->{dentry,mnt} Jan Blunck
2007-10-09 18:05 ` [patch 06/10] Introduce path_put() Jan Blunck
2007-10-09 18:05 ` [patch 07/10] Use path_put() in a few places instead of {mnt,d}put() Jan Blunck
2007-10-09 18:05 ` [patch 08/10] Introduce path_get() Jan Blunck
2007-10-09 18:05 ` [patch 09/10] Use struct path in fs_struct Jan Blunck
2007-10-09 18:05 ` [patch 10/10] Make set_fs_{root,pwd} take a struct path Jan Blunck
-- strict thread matches above, loose matches on Subject: below --
2007-09-27 14:12 [patch 00/10] Use struct path in struct nameidata jblunck
2007-09-27 14:12 ` [patch 03/10] Remove path_release_on_umount() jblunck
2007-09-28 18:34 ` Christoph Hellwig
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=20071009180512.524561417@X40.localnet \
--to=jblunck@suse.de \
--cc=agruen@suse.de \
--cc=akpm@osdl.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
/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