From: Dipankar Sarma <dipankar@in.ibm.com>
To: Andrew Morton <akpm@digeo.com>
Cc: maneesh@in.ibm.com, linux-kernel@vger.kernel.org,
viro@parcelfarce.linux.theplanet.co.uk, Paul.McKenney@us.ibm.com
Subject: Re: [patch 1/2] vfsmount_lock
Date: Wed, 21 May 2003 15:23:14 +0530 [thread overview]
Message-ID: <20030521095313.GA2861@in.ibm.com> (raw)
In-Reply-To: <20030521023523.655bc8f2.akpm@digeo.com>
On Wed, May 21, 2003 at 02:35:23AM -0700, Andrew Morton wrote:
> Maneesh Soni <maneesh@in.ibm.com> wrote:
> >
> > struct vfsmount *lookup_mnt(struct vfsmount *mnt, struct dentry *dentry)
> > {
> > + spin_lock(&vfsmount_lock);
> > for (;;) {
> > tmp = tmp->next;
> > p = NULL;
> > if (tmp == head)
> > break;
> > p = list_entry(tmp, struct vfsmount, mnt_hash);
> > - if (p->mnt_parent == mnt && p->mnt_mountpoint == dentry)
> > + if (p->mnt_parent == mnt && p->mnt_mountpoint == dentry) {
> > + found = mntget(p);
> > break;
> > + }
> > }
> > - return p;
> > + spin_lock(&vfsmount_lock);
> > + return found;
> > }
>
> err, how many times do you want to spin that lock?
None, if you apply the second patch ;-)
Thanks
Dipankar
prev parent reply other threads:[~2003-05-21 9:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-21 9:25 [patch 1/2] vfsmount_lock Maneesh Soni
2003-05-21 9:26 ` [patch 2/2] lockfree lookup_mnt Maneesh Soni
2003-05-21 9:35 ` [patch 1/2] vfsmount_lock Andrew Morton
2003-05-21 9:38 ` Paul Rolland
2003-05-21 9:43 ` Maneesh Soni
2003-05-21 9:45 ` [patch 2/2] lockfree lookup_mnt Maneesh Soni
2003-05-21 9:53 ` Dipankar Sarma [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=20030521095313.GA2861@in.ibm.com \
--to=dipankar@in.ibm.com \
--cc=Paul.McKenney@us.ibm.com \
--cc=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maneesh@in.ibm.com \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox