btrfs: pass true to btrfs_delalloc_release_space() at btrfs_page_mkwrite()
authorFilipe Manana <fdmanana@suse.com>
Mon, 12 May 2025 07:55:42 +0000 (08:55 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 15 May 2025 16:24:15 +0000 (18:24 +0200)
In the last call to btrfs_delalloc_release_space() where the value of the
variable 'ret' is never zero, we pass the expression 'ret != 0' as the
value for the argument 'qgroup_free', which always evaluates to true.
Make this less confusing and more clear by explicitly passing true
instead.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c

index 32aad1b02b01ad4235b2267c56bf735d142b093a..a2b1fc536fdd21313542d8ce1623297ec9f5fc37 100644 (file)
@@ -1971,7 +1971,7 @@ out_unlock:
 out:
        btrfs_delalloc_release_extents(BTRFS_I(inode), fsize);
        btrfs_delalloc_release_space(BTRFS_I(inode), data_reserved, page_start,
-                                    reserved_space, (ret != 0));
+                                    reserved_space, true);
 out_noreserve:
        sb_end_pagefault(inode->i_sb);
        extent_changeset_free(data_reserved);