From: "J. Bruce Fields" <bfields@fieldses.org>
To: David Howells <dhowells@redhat.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] AFS: Implement file locking [try #2]
Date: Tue, 29 May 2007 17:57:36 -0400 [thread overview]
Message-ID: <20070529215736.GO6815@fieldses.org> (raw)
In-Reply-To: <20070529145426.19366.35289.stgit@warthog.cambridge.redhat.com>
One more vague question I had while skimming the previous version--
On Tue, May 29, 2007 at 03:54:27PM +0100, David Howells wrote:
> +static void afs_grant_locks(struct afs_vnode *vnode, struct file_lock *fl)
> +{
> + struct file_lock *p, *_p;
> +
> + list_move_tail(&fl->fl_u.afs.link, &vnode->granted_locks);
> + if (fl->fl_type == F_RDLCK) {
> + list_for_each_entry_safe(p, _p, &vnode->pending_locks,
> + fl_u.afs.link) {
> + if (p->fl_type == F_RDLCK) {
> + p->fl_u.afs.state = AFS_LOCK_GRANTED;
> + list_move_tail(&p->fl_u.afs.link,
> + &vnode->granted_locks);
> + wake_up(&p->fl_wait);
> + }
> + }
> + }
> +}
--without having tried to understand how they're actually used, these
data structures (like the pending_locks and granted_locks lists) seem to
duplicate stuff that's already kept in fs/locks.c. Is there a reason
they're required?
--b.
next prev parent reply other threads:[~2007-05-29 21:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-29 14:54 [PATCH] AFS: Implement file locking [try #2] David Howells
2007-05-29 21:57 ` J. Bruce Fields [this message]
2007-05-30 8:35 ` David Howells
2007-05-30 18:03 ` J. Bruce Fields
2007-05-31 9:41 ` David Howells
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=20070529215736.GO6815@fieldses.org \
--to=bfields@fieldses.org \
--cc=akpm@osdl.org \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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.