提交 897c5df6 编写于 作者: A Al Viro 提交者: Mike Marshall

orangefs: get rid of op->done

shouldn't be needed now
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NMike Marshall <hubcap@omnibond.com>
上级 82d37f19
...@@ -424,19 +424,6 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb, ...@@ -424,19 +424,6 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
* application reading/writing this device to return until * application reading/writing this device to return until
* the buffers are done being used. * the buffers are done being used.
*/ */
if (op->downcall.type == ORANGEFS_VFS_OP_FILE_IO) {
long n = wait_for_completion_interruptible_timeout(&op->done,
op_timeout_secs * HZ);
if (unlikely(n < 0)) {
gossip_debug(GOSSIP_DEV_DEBUG,
"%s: signal on I/O wait, aborting\n",
__func__);
} else if (unlikely(n == 0)) {
gossip_debug(GOSSIP_DEV_DEBUG,
"%s: timed out.\n",
__func__);
}
}
out: out:
if (unlikely(op_is_cancel(op))) if (unlikely(op_is_cancel(op)))
put_cancel(op); put_cancel(op);
......
...@@ -199,7 +199,7 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod ...@@ -199,7 +199,7 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod
if (orangefs_cancel_op_in_progress(new_op)) if (orangefs_cancel_op_in_progress(new_op))
return ret; return ret;
goto done_copying; goto out;
} }
/* /*
...@@ -212,7 +212,7 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod ...@@ -212,7 +212,7 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod
iter, iter,
new_op->downcall.resp.io.amt_complete); new_op->downcall.resp.io.amt_complete);
if (ret < 0) if (ret < 0)
goto done_copying; goto out;
} }
gossip_debug(GOSSIP_FILE_DEBUG, gossip_debug(GOSSIP_FILE_DEBUG,
"%s(%pU): Amount written as returned by the sys-io call:%d\n", "%s(%pU): Amount written as returned by the sys-io call:%d\n",
...@@ -222,12 +222,10 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod ...@@ -222,12 +222,10 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod
ret = new_op->downcall.resp.io.amt_complete; ret = new_op->downcall.resp.io.amt_complete;
done_copying:
/* /*
* tell the device file owner waiting on I/O that this read has * tell the device file owner waiting on I/O that this read has
* completed and it can return now. * completed and it can return now.
*/ */
complete(&new_op->done);
out: out:
if (buffer_index >= 0) { if (buffer_index >= 0) {
......
...@@ -122,8 +122,6 @@ struct orangefs_kernel_op_s *op_alloc(__s32 type) ...@@ -122,8 +122,6 @@ struct orangefs_kernel_op_s *op_alloc(__s32 type)
atomic_set(&new_op->ref_count, 1); atomic_set(&new_op->ref_count, 1);
init_completion(&new_op->done);
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;
......
...@@ -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;
struct completion done;
atomic_t ref_count; atomic_t ref_count;
/* VFS aio fields */ /* VFS aio fields */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册