summaryrefslogtreecommitdiff
path: root/fs/orangefs/orangefs-kernel.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-01-21 23:17:37 -0500
committerMike Marshall <hubcap@omnibond.com>2016-01-23 12:42:43 -0500
commit831d0949799be75ed84c1c6a4541ebcd74edba6c (patch)
tree169e32f185f943ef54502cab688159dd1a661c3a /fs/orangefs/orangefs-kernel.h
parentb7ae37b09e069a5d8d604caabd6675456a0d89fc (diff)
orangefs: move wakeups into set_op_state_{serviced,purged}()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/orangefs-kernel.h')
-rw-r--r--fs/orangefs/orangefs-kernel.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kernel.h
index 825545a7d167..160c4c6a4d17 100644
--- a/fs/orangefs/orangefs-kernel.h
+++ b/fs/orangefs/orangefs-kernel.h
@@ -105,8 +105,16 @@ enum orangefs_vfs_op_states {
#define set_op_state_waiting(op) ((op)->op_state = OP_VFS_STATE_WAITING)
#define set_op_state_inprogress(op) ((op)->op_state = OP_VFS_STATE_INPROGR)
-#define set_op_state_serviced(op) ((op)->op_state = OP_VFS_STATE_SERVICED)
-#define set_op_state_purged(op) ((op)->op_state |= OP_VFS_STATE_PURGED)
+static inline void set_op_state_serviced(struct orangefs_kernel_op_s *op)
+{
+ op->op_state = OP_VFS_STATE_SERVICED;
+ wake_up_interruptible(&op->waitq);
+}
+static inline void set_op_state_purged(struct orangefs_kernel_op_s *op)
+{
+ op->op_state |= OP_VFS_STATE_PURGED;
+ wake_up_interruptible(&op->waitq);
+}
#define op_state_waiting(op) ((op)->op_state & OP_VFS_STATE_WAITING)
#define op_state_in_progress(op) ((op)->op_state & OP_VFS_STATE_INPROGR)