diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-02-18 19:17:51 -0500 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2016-02-19 13:45:56 -0500 |
commit | c1223ca48baa867e9abc77fbb7f97500dc2a0cf8 (patch) | |
tree | da56a5a984ccae1556fba8932b270d0b88cfd920 /fs/orangefs | |
parent | 05a50a5be897004b6c1399645256bcf2e768b4ef (diff) |
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>
Diffstat (limited to 'fs/orangefs')
-rw-r--r-- | fs/orangefs/orangefs-cache.c | 4 | ||||
-rw-r--r-- | fs/orangefs/orangefs-kernel.h | 20 |
2 files changed, 2 insertions, 22 deletions
diff --git a/fs/orangefs/orangefs-cache.c b/fs/orangefs/orangefs-cache.c index 817092a14429..900a2e38e11b 100644 --- a/fs/orangefs/orangefs-cache.c +++ b/fs/orangefs/orangefs-cache.c | |||
@@ -120,8 +120,6 @@ struct orangefs_kernel_op_s *op_alloc(__s32 type) | |||
120 | spin_lock_init(&new_op->lock); | 120 | spin_lock_init(&new_op->lock); |
121 | init_completion(&new_op->waitq); | 121 | init_completion(&new_op->waitq); |
122 | 122 | ||
123 | atomic_set(&new_op->ref_count, 1); | ||
124 | |||
125 | new_op->upcall.type = ORANGEFS_VFS_OP_INVALID; | 123 | new_op->upcall.type = ORANGEFS_VFS_OP_INVALID; |
126 | new_op->downcall.type = ORANGEFS_VFS_OP_INVALID; | 124 | new_op->downcall.type = ORANGEFS_VFS_OP_INVALID; |
127 | new_op->downcall.status = -1; | 125 | new_op->downcall.status = -1; |
@@ -149,7 +147,7 @@ struct orangefs_kernel_op_s *op_alloc(__s32 type) | |||
149 | return new_op; | 147 | return new_op; |
150 | } | 148 | } |
151 | 149 | ||
152 | void __op_release(struct orangefs_kernel_op_s *orangefs_op) | 150 | void op_release(struct orangefs_kernel_op_s *orangefs_op) |
153 | { | 151 | { |
154 | if (orangefs_op) { | 152 | if (orangefs_op) { |
155 | gossip_debug(GOSSIP_CACHE_DEBUG, | 153 | gossip_debug(GOSSIP_CACHE_DEBUG, |
diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kernel.h index 7d0c8b3afc7e..6290c24d8270 100644 --- a/fs/orangefs/orangefs-kernel.h +++ b/fs/orangefs/orangefs-kernel.h | |||
@@ -205,8 +205,6 @@ struct orangefs_kernel_op_s { | |||
205 | struct completion waitq; | 205 | struct completion waitq; |
206 | spinlock_t lock; | 206 | spinlock_t lock; |
207 | 207 | ||
208 | atomic_t ref_count; | ||
209 | |||
210 | /* VFS aio fields */ | 208 | /* VFS aio fields */ |
211 | 209 | ||
212 | int attempts; | 210 | int attempts; |
@@ -230,23 +228,7 @@ static inline void set_op_state_serviced(struct orangefs_kernel_op_s *op) | |||
230 | #define op_state_given_up(op) ((op)->op_state & OP_VFS_STATE_GIVEN_UP) | 228 | #define op_state_given_up(op) ((op)->op_state & OP_VFS_STATE_GIVEN_UP) |
231 | #define op_is_cancel(op) ((op)->upcall.type == ORANGEFS_VFS_OP_CANCEL) | 229 | #define op_is_cancel(op) ((op)->upcall.type == ORANGEFS_VFS_OP_CANCEL) |
232 | 230 | ||
233 | static inline void get_op(struct orangefs_kernel_op_s *op) | 231 | void op_release(struct orangefs_kernel_op_s *op); |
234 | { | ||
235 | atomic_inc(&op->ref_count); | ||
236 | gossip_debug(GOSSIP_DEV_DEBUG, | ||
237 | "(get) Alloced OP (%p:%llu)\n", op, llu(op->tag)); | ||
238 | } | ||
239 | |||
240 | void __op_release(struct orangefs_kernel_op_s *op); | ||
241 | |||
242 | static inline void op_release(struct orangefs_kernel_op_s *op) | ||
243 | { | ||
244 | if (atomic_dec_and_test(&op->ref_count)) { | ||
245 | gossip_debug(GOSSIP_DEV_DEBUG, | ||
246 | "(put) Releasing OP (%p:%llu)\n", op, llu((op)->tag)); | ||
247 | __op_release(op); | ||
248 | } | ||
249 | } | ||
250 | 232 | ||
251 | extern void orangefs_bufmap_put(int); | 233 | extern void orangefs_bufmap_put(int); |
252 | static inline void put_cancel(struct orangefs_kernel_op_s *op) | 234 | static inline void put_cancel(struct orangefs_kernel_op_s *op) |