diff options
author | 2022-02-04 04:06:27 -0800 | |
---|---|---|
committer | 2022-03-14 13:13:49 +0100 | |
commit | 6b5b7a41d0704f2e3e864b0e4a2539beecefade6 (patch) | |
tree | 0ccb5ea7465f812a52e257e5c2249cbd31d9d5aa | |
parent | btrfs: zoned: remove redundant assignment in btrfs_check_zoned_mode (diff) | |
download | linux-dev-6b5b7a41d0704f2e3e864b0e4a2539beecefade6.tar.xz linux-dev-6b5b7a41d0704f2e3e864b0e4a2539beecefade6.zip |
btrfs: stop checking for NULL return from btrfs_get_extent_fiemap()
In get_extent_skip_holes() we're checking the return of
btrfs_get_extent_fiemap() for an error pointer or NULL, but
btrfs_get_extent_fiemap() will never return NULL, only error pointers or
a valid extent_map.
The other caller of btrfs_get_extent_fiemap(), find_desired_extent(),
correctly only checks for error-pointers.
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/extent_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 4c91060d103a..6bafdec691eb 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -5390,7 +5390,7 @@ static struct extent_map *get_extent_skip_holes(struct btrfs_inode *inode, break; len = ALIGN(len, sectorsize); em = btrfs_get_extent_fiemap(inode, offset, len); - if (IS_ERR_OR_NULL(em)) + if (IS_ERR(em)) return em; /* if this isn't a hole return it */ |