Skip to content

Commit b1116bc

Browse files
committed
orangefs: use sparse annotations for holding locks across function calls.
Sparse complained and Al Viro knew what to do... Signed-off-by: Mike Marshall <hubcap@omnibond.com>
1 parent 3cf796a commit b1116bc

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

‎fs/orangefs/waitqueue.c‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@
1717
#include "orangefs-kernel.h"
1818
#include "orangefs-bufmap.h"
1919

20-
static int wait_for_matching_downcall(struct orangefs_kernel_op_s *, long, bool);
21-
static void orangefs_clean_up_interrupted_operation(struct orangefs_kernel_op_s *);
20+
static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op,
21+
long timeout,
22+
bool interruptible)
23+
__acquires(op->lock);
24+
static void orangefs_clean_up_interrupted_operation(struct orangefs_kernel_op_s *op)
25+
__releases(op->lock);
2226

2327
/*
2428
* What we do in this function is to walk the list of operations that are
@@ -246,6 +250,7 @@ bool orangefs_cancel_op_in_progress(struct orangefs_kernel_op_s *op)
246250
*/
247251
static void
248252
orangefs_clean_up_interrupted_operation(struct orangefs_kernel_op_s *op)
253+
__releases(op->lock)
249254
{
250255
/*
251256
* handle interrupted cases depending on what state we were in when
@@ -313,8 +318,9 @@ static void
313318
* Returns with op->lock taken.
314319
*/
315320
static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op,
316-
long timeout,
317-
bool interruptible)
321+
long timeout,
322+
bool interruptible)
323+
__acquires(op->lock)
318324
{
319325
long n;
320326

0 commit comments

Comments
 (0)