linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [fuse] Add lock annotations to request_end and fuse_read_interrupt
@ 2006-07-25  0:31 Josh Triplett
  2006-07-25  9:19 ` Miklos Szeredi
  0 siblings, 1 reply; 2+ messages in thread
From: Josh Triplett @ 2006-07-25  0:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Miklos Szeredi, fuse-devel

request_end and fuse_read_interrupt release fc->lock.  Add lock annotations to
these two functions so that sparse can check callers for lock pairing, and so
that sparse will not complain about these functions since they intentionally
use locks in this manner.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
---
 fs/fuse/dev.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 1e2006c..4fc557c 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -212,6 +212,7 @@ void fuse_put_request(struct fuse_conn *
  * Called with fc->lock, unlocks it
  */
 static void request_end(struct fuse_conn *fc, struct fuse_req *req)
+	__releases(fc->lock)
 {
 	void (*end) (struct fuse_conn *, struct fuse_req *) = req->end;
 	req->end = NULL;
@@ -640,6 +641,7 @@ static void request_wait(struct fuse_con
  */
 static int fuse_read_interrupt(struct fuse_conn *fc, struct fuse_req *req,
 			       const struct iovec *iov, unsigned long nr_segs)
+	__releases(fc->lock)
 {
 	struct fuse_copy_state cs;
 	struct fuse_in_header ih;



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] [fuse] Add lock annotations to request_end and fuse_read_interrupt
  2006-07-25  0:31 [PATCH] [fuse] Add lock annotations to request_end and fuse_read_interrupt Josh Triplett
@ 2006-07-25  9:19 ` Miklos Szeredi
  0 siblings, 0 replies; 2+ messages in thread
From: Miklos Szeredi @ 2006-07-25  9:19 UTC (permalink / raw)
  To: josht; +Cc: linux-kernel, akpm, fuse-devel

> request_end and fuse_read_interrupt release fc->lock.  Add lock annotations to
> these two functions so that sparse can check callers for lock pairing, and so
> that sparse will not complain about these functions since they intentionally
> use locks in this manner.
> 
> Signed-off-by: Josh Triplett <josh@freedesktop.org>

Acked-by: Miklos Szeredi <miklos@szeredi.hu>

Thanks,
Miklos

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-25  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-25  0:31 [PATCH] [fuse] Add lock annotations to request_end and fuse_read_interrupt Josh Triplett
2006-07-25  9:19 ` Miklos Szeredi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).