]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
vfs: Remove useless loop in mntput_no_expire
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 14 Apr 2014 05:22:15 +0000 (22:22 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 16 Apr 2014 00:11:13 +0000 (17:11 -0700)
Remove the extra reference added to mnt_count by the mnt_pinned code,
and stop jumping to the top of mntput_no_expire.

When fput synchronously called mntput that extra reference count and
the loop ensured that after acct_auto_close_mnt closed all of the
pinned references mntput_no_expire would then proceed actually
unmount the filesystem.

As fput is asynchronous today there is no point in looping.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
fs/namespace.c

index 52f4174e294c46b783769a6ce4267f32106301b8..81086e46f1f76eb9bd42fe7da8db19e71b499902 100644 (file)
@@ -955,7 +955,6 @@ static void delayed_free(struct rcu_head *head)
 
 static void mntput_no_expire(struct mount *mnt)
 {
-put_again:
        rcu_read_lock();
        mnt_add_count(mnt, -1);
        if (likely(mnt->mnt_ns)) { /* shouldn't be the last one */
@@ -969,12 +968,12 @@ put_again:
                return;
        }
        if (unlikely(mnt->mnt_pinned)) {
-               mnt_add_count(mnt, mnt->mnt_pinned + 1);
+               mnt_add_count(mnt, mnt->mnt_pinned);
                mnt->mnt_pinned = 0;
                rcu_read_unlock();
                unlock_mount_hash();
                acct_auto_close_mnt(&mnt->mnt);
-               goto put_again;
+               return;
        }
        if (unlikely(mnt->mnt.mnt_flags & MNT_DOOMED)) {
                rcu_read_unlock();