Commit b1116bc0 authored by Mike Marshall's avatar Mike Marshall

orangefs: use sparse annotations for holding locks across function calls.

Sparse complained and Al Viro knew what to do...
Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
parent 3cf796af
...@@ -17,8 +17,12 @@ ...@@ -17,8 +17,12 @@
#include "orangefs-kernel.h" #include "orangefs-kernel.h"
#include "orangefs-bufmap.h" #include "orangefs-bufmap.h"
static int wait_for_matching_downcall(struct orangefs_kernel_op_s *, long, bool); static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op,
static void orangefs_clean_up_interrupted_operation(struct orangefs_kernel_op_s *); 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 * 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) ...@@ -246,6 +250,7 @@ bool orangefs_cancel_op_in_progress(struct orangefs_kernel_op_s *op)
*/ */
static void static void
orangefs_clean_up_interrupted_operation(struct orangefs_kernel_op_s *op) 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 * handle interrupted cases depending on what state we were in when
...@@ -313,8 +318,9 @@ static void ...@@ -313,8 +318,9 @@ static void
* Returns with op->lock taken. * Returns with op->lock taken.
*/ */
static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op, static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op,
long timeout, long timeout,
bool interruptible) bool interruptible)
__acquires(op->lock)
{ {
long n; long n;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment