All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
To: Zach Brown <zach.brown@oracle.com>
Cc: linux-fsdevel@vger.kernel.org,
	Linux-kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] [2.6.24-rc3-mm1] loop cleanup in fs/namespace.c - repost
Date: Thu, 22 Nov 2007 01:49:19 +0300	[thread overview]
Message-ID: <4744B5EF.5010708@gmail.com> (raw)
In-Reply-To: <47449932.3090801@oracle.com>

[-- Attachment #1: Type: text/plain, Size: 810 bytes --]

Zach Brown пишет:
>>> This doesn't look fine.  Did you test this?
>> Oops, my fault. Of course, I tested the patch, but kernel modules are
>> disabled in my test setup, so I missed the error.
> 
> :)
> 
>> Enclosed to this message is a new patch, which replaces the goto-loop by
>> the while-based one, but leaves the EXPORT_SYMBOL macro intact.
> 
> It certainly looks OK to me now, for whatever that's worth. 

Zach, thank you for the code review and suggestions.

> 
> You probably want to wait 'till the next merge window to get it in,
> though.  It's just a cleanup and so shouldn't go in this late in the -rc
> line.
> 
> Maybe Andrew will be willing to queue it until that time in -mm.

I am enclosing the patch against current -mm tree and adding Andrew to the Cc: list.

Thanks,

Dmitri

> 
> - z
> 


[-- Attachment #2: loop-cleanup-fs-namespace-mm.diff --]
[-- Type: text/x-patch, Size: 741 bytes --]

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
diff --git a/fs/namespace.c b/fs/namespace.c
index 79883fe..b098b63 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -606,19 +606,17 @@ static inline void __mntput(struct vfsmo
 
 void mntput_no_expire(struct vfsmount *mnt)
 {
-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;
 	}
 }
 

  reply	other threads:[~2007-11-21 22:49 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       ` Dmitri Vorobiev [this message]
2007-11-21 23:24         ` [PATCH] [2.6.24-rc3-mm1] loop " Andrew Morton
2007-11-21 23:24           ` Andrew Morton
2007-11-21 23:47           ` Dmitri Vorobiev
2007-11-26 10:30           ` Al Viro

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=4744B5EF.5010708@gmail.com \
    --to=dmitri.vorobiev@gmail.com \
    --cc=akpm@linux-foundation.org \
    --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.