diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 53697a80b849..f5e623371bf3 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -7422,15 +7422,15 @@ static ssize_t btrfs_direct_IO(int rw, struct kiocb *iocb, | |||
7422 | smp_mb__after_atomic_inc(); | 7422 | smp_mb__after_atomic_inc(); |
7423 | 7423 | ||
7424 | /* | 7424 | /* |
7425 | * The generic stuff only does filemap_write_and_wait_range, which isn't | 7425 | * The generic stuff only does filemap_write_and_wait_range, which |
7426 | * enough if we've written compressed pages to this area, so we need to | 7426 | * isn't enough if we've written compressed pages to this area, so |
7427 | * call btrfs_wait_ordered_range to make absolutely sure that any | 7427 | * we need to flush the dirty pages again to make absolutely sure |
7428 | * outstanding dirty pages are on disk. | 7428 | * that any outstanding dirty pages are on disk. |
7429 | */ | 7429 | */ |
7430 | count = iov_length(iov, nr_segs); | 7430 | count = iov_length(iov, nr_segs); |
7431 | ret = btrfs_wait_ordered_range(inode, offset, count); | 7431 | if (test_bit(BTRFS_INODE_HAS_ASYNC_EXTENT, |
7432 | if (ret) | 7432 | &BTRFS_I(inode)->runtime_flags)) |
7433 | return ret; | 7433 | filemap_fdatawrite_range(inode->i_mapping, offset, count); |
7434 | 7434 | ||
7435 | if (rw & WRITE) { | 7435 | if (rw & WRITE) { |
7436 | /* | 7436 | /* |