diff options
author | Filipe Manana <fdmanana@suse.com> | 2025-05-09 17:29:55 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2025-05-15 14:30:57 +0200 |
commit | ca84913d490dad56b5ca7580be064b039039bd34 (patch) | |
tree | ab56b7c767c700fd06b7b3e4c77c65941a5811c0 /fs/btrfs | |
parent | d3914d6030aa6be2993dfc223d096ff93018c236 (diff) |
btrfs: remove superfluous return value check at btrfs_dio_iomap_begin()
In the if statement that checks the return value from
btrfs_check_data_free_space(), there's no point to check if 'ret' is not
zero in the else branch, since the main if branch checked that it's zero,
so in the else branch it necessarily has a non-zero value.
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/direct-io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/direct-io.c b/fs/btrfs/direct-io.c index 546410c8fac0..fe9a4bd7e6e6 100644 --- a/fs/btrfs/direct-io.c +++ b/fs/btrfs/direct-io.c @@ -439,8 +439,8 @@ static int btrfs_dio_iomap_begin(struct inode *inode, loff_t start, start, data_alloc_len, false); if (!ret) dio_data->data_space_reserved = true; - else if (ret && !(BTRFS_I(inode)->flags & - (BTRFS_INODE_NODATACOW | BTRFS_INODE_PREALLOC))) + else if (!(BTRFS_I(inode)->flags & + (BTRFS_INODE_NODATACOW | BTRFS_INODE_PREALLOC))) goto err; } |