ocfs2_file_write_iter: keep return value and current position update in sync

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 9ce5a232 cf1b5ea1

Changed files
+1 -1
fs
ocfs2
+1 -1
fs/ocfs2/file.c
··· 2408 2408 goto out_dio; 2409 2409 } 2410 2410 2411 - iocb->ki_pos = *ppos + written_buffered; 2412 2411 /* We need to ensure that the page cache pages are written to 2413 2412 * disk and invalidated to preserve the expected O_DIRECT 2414 2413 * semantics. ··· 2416 2417 ret = filemap_write_and_wait_range(file->f_mapping, *ppos, 2417 2418 endbyte); 2418 2419 if (ret == 0) { 2420 + iocb->ki_pos = *ppos + written_buffered; 2419 2421 written += written_buffered; 2420 2422 invalidate_mapping_pages(mapping, 2421 2423 *ppos >> PAGE_CACHE_SHIFT,