Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

orangefs: get rid of op refcounts

not needed anymore

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>

authored by

Al Viro and committed by
Mike Marshall
c1223ca4 05a50a5b

+2 -22
+1 -3
fs/orangefs/orangefs-cache.c
··· 120 120 spin_lock_init(&new_op->lock); 121 121 init_completion(&new_op->waitq); 122 122 123 - atomic_set(&new_op->ref_count, 1); 124 - 125 123 new_op->upcall.type = ORANGEFS_VFS_OP_INVALID; 126 124 new_op->downcall.type = ORANGEFS_VFS_OP_INVALID; 127 125 new_op->downcall.status = -1; ··· 147 149 return new_op; 148 150 } 149 151 150 - void __op_release(struct orangefs_kernel_op_s *orangefs_op) 152 + void op_release(struct orangefs_kernel_op_s *orangefs_op) 151 153 { 152 154 if (orangefs_op) { 153 155 gossip_debug(GOSSIP_CACHE_DEBUG,
+1 -19
fs/orangefs/orangefs-kernel.h
··· 205 205 struct completion waitq; 206 206 spinlock_t lock; 207 207 208 - atomic_t ref_count; 209 - 210 208 /* VFS aio fields */ 211 209 212 210 int attempts; ··· 228 230 #define op_state_given_up(op) ((op)->op_state & OP_VFS_STATE_GIVEN_UP) 229 231 #define op_is_cancel(op) ((op)->upcall.type == ORANGEFS_VFS_OP_CANCEL) 230 232 231 - static inline void get_op(struct orangefs_kernel_op_s *op) 232 - { 233 - atomic_inc(&op->ref_count); 234 - gossip_debug(GOSSIP_DEV_DEBUG, 235 - "(get) Alloced OP (%p:%llu)\n", op, llu(op->tag)); 236 - } 237 - 238 - void __op_release(struct orangefs_kernel_op_s *op); 239 - 240 - static inline void op_release(struct orangefs_kernel_op_s *op) 241 - { 242 - if (atomic_dec_and_test(&op->ref_count)) { 243 - gossip_debug(GOSSIP_DEV_DEBUG, 244 - "(put) Releasing OP (%p:%llu)\n", op, llu((op)->tag)); 245 - __op_release(op); 246 - } 247 - } 233 + void op_release(struct orangefs_kernel_op_s *op); 248 234 249 235 extern void orangefs_bufmap_put(int); 250 236 static inline void put_cancel(struct orangefs_kernel_op_s *op)