diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-19 21:01:03 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 14:12:55 -0400 |
commit | 8d71db4f0890605d44815a2b2da4ca003f1bb142 (patch) | |
tree | e5bb078717c3e8ace7f032b940ada7901dbab545 /fs/read_write.c | |
parent | 5f2e354f5212a49fc639c25de2581cc8ae90d11b (diff) | |
download | linux-8d71db4f0890605d44815a2b2da4ca003f1bb142.tar.bz2 |
lift sb_start_write/sb_end_write out of ->aio_write()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/read_write.c')
-rw-r--r-- | fs/read_write.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/read_write.c b/fs/read_write.c index f7b5a23b804b..3e1791a2cfd6 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -398,6 +398,7 @@ ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, lof struct kiocb kiocb; ssize_t ret; + file_start_write(filp); init_sync_kiocb(&kiocb, filp); kiocb.ki_pos = *ppos; kiocb.ki_left = len; @@ -413,6 +414,7 @@ ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, lof if (-EIOCBQUEUED == ret) ret = wait_on_sync_kiocb(&kiocb); *ppos = kiocb.ki_pos; + file_end_write(filp); return ret; } @@ -758,10 +760,12 @@ static ssize_t do_readv_writev(int type, struct file *file, fnv = file->f_op->aio_write; } - if (fnv) + if (fnv) { + file_start_write(file); ret = do_sync_readv_writev(file, iov, nr_segs, tot_len, pos, fnv); - else + file_end_write(file); + } else ret = do_loop_readv_writev(file, iov, nr_segs, pos, fn); out: |