summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Marshall <hubcap@omnibond.com>2016-01-13 19:29:05 +0300
committerMike Marshall <hubcap@omnibond.com>2016-01-13 19:29:05 +0300
commitc817e266e408538290af06b95f07f6ee2b7d507a (patch)
treebcb473e6b5642133e6038e2b72df9b12d446dab9
parentb3ae4755f561cffd23192cd1fb9648649aa7405e (diff)
downloadlinux-c817e266e408538290af06b95f07f6ee2b7d507a.tar.xz
Orangefs: rename orangefs_kernel_op_s.aio_ref_count to just ref_count.
The op structure's ref_count member hasn't got anything to do with asynchronous I/O. Signed-off-by: Mike Marshall <hubcap@omnibond.com>
-rw-r--r--fs/orangefs/orangefs-cache.c2
-rw-r--r--fs/orangefs/orangefs-kernel.h11
2 files changed, 6 insertions, 7 deletions
diff --git a/fs/orangefs/orangefs-cache.c b/fs/orangefs/orangefs-cache.c
index b40f5d74aa97..dd4335ff8c10 100644
--- a/fs/orangefs/orangefs-cache.c
+++ b/fs/orangefs/orangefs-cache.c
@@ -120,7 +120,7 @@ struct orangefs_kernel_op_s *op_alloc(__s32 type)
init_waitqueue_head(&new_op->waitq);
init_waitqueue_head(&new_op->io_completion_waitq);
- atomic_set(&new_op->aio_ref_count, 0);
+ atomic_set(&new_op->ref_count, 0);
orangefs_op_initialize(new_op);
diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kernel.h
index 0c7a9cf9b8ef..1c87e0bbdfe8 100644
--- a/fs/orangefs/orangefs-kernel.h
+++ b/fs/orangefs/orangefs-kernel.h
@@ -115,7 +115,7 @@ enum orangefs_vfs_op_states {
#define get_op(op) \
do { \
- atomic_inc(&(op)->aio_ref_count); \
+ atomic_inc(&(op)->ref_count); \
gossip_debug(GOSSIP_DEV_DEBUG, \
"(get) Alloced OP (%p:%llu)\n", \
op, \
@@ -124,7 +124,7 @@ enum orangefs_vfs_op_states {
#define put_op(op) \
do { \
- if (atomic_sub_and_test(1, &(op)->aio_ref_count) == 1) { \
+ if (atomic_sub_and_test(1, &(op)->ref_count) == 1) { \
gossip_debug(GOSSIP_DEV_DEBUG, \
"(put) Releasing OP (%p:%llu)\n", \
op, \
@@ -133,7 +133,7 @@ enum orangefs_vfs_op_states {
} \
} while (0)
-#define op_wait(op) (atomic_read(&(op)->aio_ref_count) <= 2 ? 0 : 1)
+#define op_wait(op) (atomic_read(&(op)->ref_count) <= 2 ? 0 : 1)
/*
* Defines for controlling whether I/O upcalls are for async or sync operations
@@ -239,14 +239,13 @@ struct orangefs_kernel_op_s {
int io_completed;
wait_queue_head_t io_completion_waitq;
+ atomic_t ref_count;
+
/* VFS aio fields */
/* used by the async I/O code to stash the orangefs_kiocb_s structure */
void *priv;
- /* used again for the async I/O code for deallocation */
- atomic_t aio_ref_count;
-
int attempts;
struct list_head list;