diff options
Diffstat (limited to 'fs')
-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 099972490f39..a39067f4dd55 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -2408,7 +2408,6 @@ relock: | |||
2408 | goto out_dio; | 2408 | goto out_dio; |
2409 | } | 2409 | } |
2410 | 2410 | ||
2411 | iocb->ki_pos = *ppos + written_buffered; | ||
2412 | /* We need to ensure that the page cache pages are written to | 2411 | /* We need to ensure that the page cache pages are written to |
2413 | * disk and invalidated to preserve the expected O_DIRECT | 2412 | * disk and invalidated to preserve the expected O_DIRECT |
2414 | * semantics. | 2413 | * semantics. |
@@ -2417,6 +2416,7 @@ relock: | |||
2417 | ret = filemap_write_and_wait_range(file->f_mapping, *ppos, | 2416 | ret = filemap_write_and_wait_range(file->f_mapping, *ppos, |
2418 | endbyte); | 2417 | endbyte); |
2419 | if (ret == 0) { | 2418 | if (ret == 0) { |
2419 | iocb->ki_pos = *ppos + written_buffered; | ||
2420 | written += written_buffered; | 2420 | written += written_buffered; |
2421 | invalidate_mapping_pages(mapping, | 2421 | invalidate_mapping_pages(mapping, |
2422 | *ppos >> PAGE_CACHE_SHIFT, | 2422 | *ppos >> PAGE_CACHE_SHIFT, |