Commit c1223ca4 authored by Al Viro's avatar Al Viro Committed by Mike Marshall

orangefs: get rid of op refcounts

not needed anymore
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
parent 05a50a5b
...@@ -120,8 +120,6 @@ struct orangefs_kernel_op_s *op_alloc(__s32 type) ...@@ -120,8 +120,6 @@ struct orangefs_kernel_op_s *op_alloc(__s32 type)
spin_lock_init(&new_op->lock); spin_lock_init(&new_op->lock);
init_completion(&new_op->waitq); init_completion(&new_op->waitq);
atomic_set(&new_op->ref_count, 1);
new_op->upcall.type = ORANGEFS_VFS_OP_INVALID; new_op->upcall.type = ORANGEFS_VFS_OP_INVALID;
new_op->downcall.type = ORANGEFS_VFS_OP_INVALID; new_op->downcall.type = ORANGEFS_VFS_OP_INVALID;
new_op->downcall.status = -1; new_op->downcall.status = -1;
...@@ -149,7 +147,7 @@ struct orangefs_kernel_op_s *op_alloc(__s32 type) ...@@ -149,7 +147,7 @@ struct orangefs_kernel_op_s *op_alloc(__s32 type)
return new_op; return new_op;
} }
void __op_release(struct orangefs_kernel_op_s *orangefs_op) void op_release(struct orangefs_kernel_op_s *orangefs_op)
{ {
if (orangefs_op) { if (orangefs_op) {
gossip_debug(GOSSIP_CACHE_DEBUG, gossip_debug(GOSSIP_CACHE_DEBUG,
......
...@@ -205,8 +205,6 @@ struct orangefs_kernel_op_s { ...@@ -205,8 +205,6 @@ struct orangefs_kernel_op_s {
struct completion waitq; struct completion waitq;
spinlock_t lock; spinlock_t lock;
atomic_t ref_count;
/* VFS aio fields */ /* VFS aio fields */
int attempts; int attempts;
...@@ -230,23 +228,7 @@ static inline void set_op_state_serviced(struct orangefs_kernel_op_s *op) ...@@ -230,23 +228,7 @@ static inline void set_op_state_serviced(struct orangefs_kernel_op_s *op)
#define op_state_given_up(op) ((op)->op_state & OP_VFS_STATE_GIVEN_UP) #define op_state_given_up(op) ((op)->op_state & OP_VFS_STATE_GIVEN_UP)
#define op_is_cancel(op) ((op)->upcall.type == ORANGEFS_VFS_OP_CANCEL) #define op_is_cancel(op) ((op)->upcall.type == ORANGEFS_VFS_OP_CANCEL)
static inline void get_op(struct orangefs_kernel_op_s *op) void op_release(struct orangefs_kernel_op_s *op);
{
atomic_inc(&op->ref_count);
gossip_debug(GOSSIP_DEV_DEBUG,
"(get) Alloced OP (%p:%llu)\n", op, llu(op->tag));
}
void __op_release(struct orangefs_kernel_op_s *op);
static inline void op_release(struct orangefs_kernel_op_s *op)
{
if (atomic_dec_and_test(&op->ref_count)) {
gossip_debug(GOSSIP_DEV_DEBUG,
"(put) Releasing OP (%p:%llu)\n", op, llu((op)->tag));
__op_release(op);
}
}
extern void orangefs_bufmap_put(int); extern void orangefs_bufmap_put(int);
static inline void put_cancel(struct orangefs_kernel_op_s *op) static inline void put_cancel(struct orangefs_kernel_op_s *op)
......
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