提交 429731b1 编写于 作者: J Jan Blunck 提交者: Linus Torvalds

Remove path_release_on_umount()

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: NJan Blunck <jblunck@suse.de>
Acked-by: NChristoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 db74ece9
......@@ -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
......
......@@ -690,7 +690,9 @@ asmlinkage long sys_umount(char __user * name, int flags)
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;
}
......
......@@ -72,7 +72,6 @@ extern int path_lookup(const char *, unsigned, struct nameidata *);
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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册