diff options
Diffstat (limited to 'fs/btrfs/bio.c')
-rw-r--r-- | fs/btrfs/bio.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c index 67fb8f6a0eb9..990a517c069b 100644 --- a/fs/btrfs/bio.c +++ b/fs/btrfs/bio.c @@ -579,11 +579,10 @@ static bool should_async_write(struct btrfs_bio *bbio) return false; /* - * If the I/O is not issued by fsync and friends, (->sync_writers != 0), - * then try to defer the submission to a workqueue to parallelize the - * checksum calculation. + * Try to defer the submission to a workqueue to parallelize the + * checksum calculation unless the I/O is issued synchronously. */ - if (atomic_read(&bbio->inode->sync_writers)) + if (op_is_sync(bbio->bio.bi_opf)) return false; /* Zoned devices require I/O to be submitted in order. */ |