diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-08 15:45:02 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-08 16:59:12 -0400 |
commit | 9ce5a232b8a941be9e74c055535d81508207a570 (patch) | |
tree | 472b0dd45ae46039ed0e795cf2d9910a68fd81fe /fs/ocfs2 | |
parent | cf1b5ea1c5cd26a003b01d4798266a4bdf0ffe64 (diff) | |
download | op-kernel-dev-9ce5a232b8a941be9e74c055535d81508207a570.zip op-kernel-dev-9ce5a232b8a941be9e74c055535d81508207a570.tar.gz |
ocfs2_file_write_iter: keep return value and current position update in sync
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 0999724..a39067f 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2408,7 +2408,6 @@ relock: goto out_dio; } - iocb->ki_pos = *ppos + written_buffered; /* We need to ensure that the page cache pages are written to * disk and invalidated to preserve the expected O_DIRECT * semantics. @@ -2417,6 +2416,7 @@ relock: ret = filemap_write_and_wait_range(file->f_mapping, *ppos, endbyte); if (ret == 0) { + iocb->ki_pos = *ppos + written_buffered; written += written_buffered; invalidate_mapping_pages(mapping, *ppos >> PAGE_CACHE_SHIFT, |