diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2013-04-26 10:58:42 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-04-29 18:44:22 +1000 |
commit | e2be46358fec739e1f8c91ca117921d6a3763206 (patch) | |
tree | 2ccbaeab5b76daf27de99de2d152aaade22467b9 | |
parent | 0bd05ebee149f00d6aaaa40234eb9e0b9c760536 (diff) |
aio-kill-ki_retry-fix
fix file_start_write/file_end_write tests
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Kent Overstreet <koverstreet@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | fs/aio.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1021,7 +1021,7 @@ static ssize_t aio_rw_vect_retry(struct kiocb *iocb, int rw, aio_rw_op *rw_op) if (iocb->ki_pos < 0) return -EINVAL; - if (opcode == IOCB_CMD_PWRITEV) + if (rw == WRITE) file_start_write(file); do { ret = rw_op(iocb, &iocb->ki_iovec[iocb->ki_cur_seg], @@ -1035,7 +1035,7 @@ static ssize_t aio_rw_vect_retry(struct kiocb *iocb, int rw, aio_rw_op *rw_op) } while (ret > 0 && iocb->ki_left > 0 && (rw == WRITE || (!S_ISFIFO(inode->i_mode) && !S_ISSOCK(inode->i_mode)))); - if (opcode == IOCB_CMD_PWRITEV) + if (rw == WRITE) file_end_write(file); /* This means we must have transferred all that we could */ |