summaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-09-28 12:41:25 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-10-24 23:34:56 -0400
commit649a795affac8507657a72e761ce987d6967016b (patch)
treec6b95fb6ebc5b6ec85e898f08af93094ce58527f /fs/namespace.c
parent6339dab869e07a81abd22970696dde6febee094a (diff)
downloadop-kernel-dev-649a795affac8507657a72e761ce987d6967016b.zip
op-kernel-dev-649a795affac8507657a72e761ce987d6967016b.tar.gz
fold mntfree() into mntput_no_expire()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c39
1 files changed, 16 insertions, 23 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 3ee6e59..691cd7c 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -872,28 +872,6 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root,
return ERR_PTR(err);
}
-static inline void mntfree(struct mount *mnt)
-{
- struct vfsmount *m = &mnt->mnt;
- struct super_block *sb = m->mnt_sb;
-
- /*
- * This probably indicates that somebody messed
- * up a mnt_want/drop_write() pair. If this
- * happens, the filesystem was probably unable
- * to make r/w->r/o transitions.
- */
- /*
- * The locking used to deal with mnt_count decrement provides barriers,
- * so mnt_get_writers() below is safe.
- */
- WARN_ON(mnt_get_writers(mnt));
- fsnotify_vfsmount_delete(m);
- dput(m->mnt_root);
- free_vfsmnt(mnt);
- deactivate_super(sb);
-}
-
static void mntput_no_expire(struct mount *mnt)
{
put_again:
@@ -929,7 +907,22 @@ put_again:
list_del(&mnt->mnt_instance);
br_write_unlock(&vfsmount_lock);
- mntfree(mnt);
+
+ /*
+ * This probably indicates that somebody messed
+ * up a mnt_want/drop_write() pair. If this
+ * happens, the filesystem was probably unable
+ * to make r/w->r/o transitions.
+ */
+ /*
+ * The locking used to deal with mnt_count decrement provides barriers,
+ * so mnt_get_writers() below is safe.
+ */
+ WARN_ON(mnt_get_writers(mnt));
+ fsnotify_vfsmount_delete(&mnt->mnt);
+ dput(mnt->mnt.mnt_root);
+ deactivate_super(mnt->mnt.mnt_sb);
+ free_vfsmnt(mnt);
}
void mntput(struct vfsmount *mnt)
OpenPOWER on IntegriCloud