diff options
author | 2022-09-12 12:27:43 -0700 | |
---|---|---|
committer | 2022-09-29 17:08:26 +0200 | |
commit | 26ce91144631a402ff82c93358d8880326a7caa3 (patch) | |
tree | dbd450729f59e3b1e947dd2e4ba8a69ed175c1f6 /fs/btrfs/file.c | |
parent | btrfs: implement a nowait option for tree searches (diff) | |
download | linux-26ce91144631a402ff82c93358d8880326a7caa3.tar.gz linux-26ce91144631a402ff82c93358d8880326a7caa3.tar.bz2 linux-26ce91144631a402ff82c93358d8880326a7caa3.zip |
btrfs: make can_nocow_extent nowait compatible
If we have NOWAIT specified on our IOCB and we're writing into a
PREALLOC or NOCOW extent then we need to be able to tell
can_nocow_extent that we don't want to wait on any locks or metadata IO.
Fix can_nocow_extent to allow for NOWAIT.
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Stefan Roesch <shr@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 3cce9803fd33..22471f611867 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1501,7 +1501,7 @@ int btrfs_check_nocow_lock(struct btrfs_inode *inode, loff_t pos, btrfs_lock_and_flush_ordered_range(inode, lockstart, lockend, NULL); ret = can_nocow_extent(&inode->vfs_inode, lockstart, &num_bytes, - NULL, NULL, NULL, false); + NULL, NULL, NULL, false, false); if (ret <= 0) { ret = 0; btrfs_drew_write_unlock(&root->snapshot_lock); |