diff options
author | Mike Marshall <hubcap@omnibond.com> | 2016-02-26 18:21:12 +0300 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2016-02-26 18:21:12 +0300 |
commit | ca9f518eadeb7edd8e438a6542d3caec9bc3bb74 (patch) | |
tree | 398f2460c1516015c78516e2888ea28af54c07a0 /fs/orangefs/devorangefs-req.c | |
parent | 401898eed7e05b8a898a44b49d5e9a510aebee83 (diff) | |
download | linux-ca9f518eadeb7edd8e438a6542d3caec9bc3bb74.tar.xz |
Orangefs: code sanitation.
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/devorangefs-req.c')
-rw-r--r-- | fs/orangefs/devorangefs-req.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/orangefs/devorangefs-req.c b/fs/orangefs/devorangefs-req.c index 0db3a57f974d..e3934c06b96a 100644 --- a/fs/orangefs/devorangefs-req.c +++ b/fs/orangefs/devorangefs-req.c @@ -46,6 +46,10 @@ static void orangefs_devreq_add_op(struct orangefs_kernel_op_s *op) list_add_tail(&op->list, &htable_ops_in_progress[index]); } +/* + * find the op with this tag and remove it from the in progress + * hash table. + */ static struct orangefs_kernel_op_s *orangefs_devreq_remove_op(__u64 tag) { struct orangefs_kernel_op_s *op, *next; @@ -190,8 +194,10 @@ restart: return -EAGAIN; } - gossip_debug(GOSSIP_DEV_DEBUG, "orangefs: reading op tag %llu %s\n", - llu(cur_op->tag), get_opname_string(cur_op)); + gossip_debug(GOSSIP_DEV_DEBUG, "%s: reading op tag %llu %s\n", + __func__, + llu(cur_op->tag), + get_opname_string(cur_op)); /* * Such an op should never be on the list in the first place. If so, we @@ -204,6 +210,7 @@ restart: spin_unlock(&orangefs_request_list_lock); return -EAGAIN; } + list_del_init(&cur_op->list); spin_unlock(&orangefs_request_list_lock); @@ -323,6 +330,7 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb, return -EPROTO; } + /* remove the op from the in progress hash table */ op = orangefs_devreq_remove_op(head.tag); if (!op) { gossip_err("WARNING: No one's waiting for tag %llu\n", @@ -486,15 +494,7 @@ static int orangefs_devreq_release(struct inode *inode, struct file *file) gossip_debug(GOSSIP_DEV_DEBUG, "ORANGEFS Device Close: Filesystem(s) %s\n", (unmounted ? "UNMOUNTED" : "MOUNTED")); - /* - * Walk through the list of ops in the request list, mark them - * as purged and wake them up. - */ purge_waiting_ops(); - /* - * Walk through the hash table of in progress operations; mark - * them as purged and wake them up - */ purge_inprogress_ops(); orangefs_bufmap_run_down(); |