summaryrefslogtreecommitdiffstats
path: root/fs/orangefs
diff options
context:
space:
mode:
authorMike Marshall <hubcap@omnibond.com>2018-06-01 14:17:23 -0400
committerMike Marshall <hubcap@omnibond.com>2018-06-01 14:51:49 -0400
commitb1116bc03c00255b7e5feaed561e8bb2fc38c0f8 (patch)
tree9e6da33220eb7020154e8448f196a5e4574b8e9c /fs/orangefs
parent3cf796afedbbbf880c523707e4d57ba4a1cee5d4 (diff)
downloadlinux-b1116bc03c00255b7e5feaed561e8bb2fc38c0f8.tar.bz2
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>
Diffstat (limited to 'fs/orangefs')
-rw-r--r--fs/orangefs/waitqueue.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/orangefs/waitqueue.c b/fs/orangefs/waitqueue.c
index 0577d6dba8c8..0729d2645d6a 100644
--- a/fs/orangefs/waitqueue.c
+++ b/fs/orangefs/waitqueue.c
@@ -17,8 +17,12 @@
#include "orangefs-kernel.h"
#include "orangefs-bufmap.h"
-static int wait_for_matching_downcall(struct orangefs_kernel_op_s *, long, bool);
-static void orangefs_clean_up_interrupted_operation(struct orangefs_kernel_op_s *);
+static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op,
+ long timeout,
+ bool interruptible)
+ __acquires(op->lock);
+static void orangefs_clean_up_interrupted_operation(struct orangefs_kernel_op_s *op)
+ __releases(op->lock);
/*
* 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)
*/
static void
orangefs_clean_up_interrupted_operation(struct orangefs_kernel_op_s *op)
+ __releases(op->lock)
{
/*
* handle interrupted cases depending on what state we were in when
@@ -313,8 +318,9 @@ static void
* Returns with op->lock taken.
*/
static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op,
- long timeout,
- bool interruptible)
+ long timeout,
+ bool interruptible)
+ __acquires(op->lock)
{
long n;