Skip to content

Commit

Permalink
orangefs: use sparse annotations for holding locks across function ca…
Browse files Browse the repository at this point in the history
…lls.

Sparse complained and Al Viro knew what to do...

Signed-off-by: Mike Marshall <hubcap@omnibond.com>
  • Loading branch information
Mike Marshall committed Jun 1, 2018
1 parent 3cf796a commit b1116bc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions fs/orangefs/waitqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit b1116bc

Please sign in to comment.