From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] [2.6.24-rc3-mm1] loop cleanup in fs/namespace.c - repost Date: Wed, 21 Nov 2007 15:24:33 -0800 Message-ID: <20071121152433.1b5289c4.akpm@linux-foundation.org> References: <47447184.6040805@gmail.com> <474481B9.9000603@oracle.com> <47448D0A.1040405@gmail.com> <47449932.3090801@oracle.com> <4744B5EF.5010708@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: zach.brown@oracle.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Dmitri Vorobiev Return-path: Received: from smtp2.linux-foundation.org ([207.189.120.14]:56193 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752252AbXKUXYq (ORCPT ); Wed, 21 Nov 2007 18:24:46 -0500 In-Reply-To: <4744B5EF.5010708@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 22 Nov 2007 01:49:19 +0300 Dmitri Vorobiev wrote: > Zach Brown =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > >>> 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. > >=20 > > :) > >=20 > >> Enclosed to this message is a new patch, which replaces the goto-l= oop by > >> the while-based one, but leaves the EXPORT_SYMBOL macro intact. > >=20 > > It certainly looks OK to me now, for whatever that's worth.=20 >=20 > Zach, thank you for the code review and suggestions. >=20 > >=20 > > 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 th= e -rc > > line. > >=20 > > Maybe Andrew will be willing to queue it until that time in -mm. >=20 > I am enclosing the patch against current -mm tree and adding Andrew t= o the Cc: list. >=20 > Thanks, >=20 > Dmitri >=20 > >=20 > > - z > >=20 >=20 >=20 [loop-cleanup-fs-namespace-mm.diff text/x-patch (742B)] Signed-off-by: Dmitri Vorobiev --- 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 =20 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 =3D 0; spin_unlock(&vfsmount_lock); acct_auto_close_mnt(mnt); security_sb_umount_close(mnt); - goto repeat; } } =20 This patch has no changelog which I can use. - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html