From: Al Viro <viro@ftp.linux.org.uk>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>,
zach.brown@oracle.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [2.6.24-rc3-mm1] loop cleanup in fs/namespace.c - repost
Date: Mon, 26 Nov 2007 10:30:28 +0000 [thread overview]
Message-ID: <20071126103028.GQ8181@ftp.linux.org.uk> (raw)
In-Reply-To: <20071121152433.1b5289c4.akpm@linux-foundation.org>
On Wed, Nov 21, 2007 at 03:24:33PM -0800, Andrew Morton wrote:
> -repeat:
> - if (atomic_dec_and_lock(&mnt->mnt_count, &vfsmount_lock)) {
> + while (atomic_dec_and_lock(&mnt->mnt_count, &vfsmount_lock)) {
> if (likely(!mnt->mnt_pinned)) {
> spin_unlock(&vfsmount_lock);
> __mntput(mnt);
> - return;
> + break;
> }
> atomic_add(mnt->mnt_pinned + 1, &mnt->mnt_count);
> mnt->mnt_pinned = 0;
> spin_unlock(&vfsmount_lock);
> acct_auto_close_mnt(mnt);
> security_sb_umount_close(mnt);
> - goto repeat;
> }
> }
>
> This patch has no changelog which I can use.
BTW, I have a problem with that one. The change is misleading; FWIW,
I'm very tempted to turn that into tail recursion, with
if (!atomic_dec_and_lock(&mnt->mnt_count, &vfsmount_lock))
return;
in the very beginning (i.e. invert the test and pull the body to top level).
prev parent reply other threads:[~2007-11-26 10:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-21 17:57 [PATCH]loop cleanup in fs/namespace.c - repost Dmitri Vorobiev
2007-11-21 19:06 ` Zach Brown
2007-11-21 19:54 ` Dmitri Vorobiev
2007-11-21 19:54 ` Dmitri Vorobiev
2007-11-21 20:46 ` Zach Brown
2007-11-21 22:49 ` [PATCH] [2.6.24-rc3-mm1] loop " Dmitri Vorobiev
2007-11-21 23:24 ` Andrew Morton
2007-11-21 23:24 ` Andrew Morton
2007-11-21 23:47 ` Dmitri Vorobiev
2007-11-26 10:30 ` Al Viro [this message]
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=20071126103028.GQ8181@ftp.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=dmitri.vorobiev@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zach.brown@oracle.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.