mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
btrfs: use PTR_ERR() instead of PTR_ERR_OR_ZERO() for btrfs_get_extent()
The function btrfs_get_extent() will only return an PTR_ERR() or a valid extent map pointer. It will not return NULL. Thus the usage of PTR_ERR_OR_ZERO() inside submit_one_sector() is not needed, use plain PTR_ERR() instead, and that is the only usage of PTR_ERR_OR_ZERO() after btrfs_get_extent(). Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
2b34879d97
commit
27602f1d1b
|
|
@ -1335,7 +1335,7 @@ static int submit_one_sector(struct btrfs_inode *inode,
|
|||
|
||||
em = btrfs_get_extent(inode, NULL, filepos, sectorsize);
|
||||
if (IS_ERR(em))
|
||||
return PTR_ERR_OR_ZERO(em);
|
||||
return PTR_ERR(em);
|
||||
|
||||
extent_offset = filepos - em->start;
|
||||
em_end = extent_map_end(em);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user