]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Remove redundant checks from btrfs_alloc_data_chunk_ondemand
authorNikolay Borisov <nborisov@suse.com>
Tue, 11 Jul 2017 10:47:50 +0000 (13:47 +0300)
committerDavid Sterba <dsterba@suse.com>
Wed, 16 Aug 2017 14:12:02 +0000 (16:12 +0200)
commit184ca2e7aedee183956d73cf253f2c03aa39a595
treebe3437981ce24581b19c87355a410926f9882785
parent4b8a2a04e65014995a8dd8ccd0a646875672267a
btrfs: Remove redundant checks from btrfs_alloc_data_chunk_ondemand

Many commits ago the data space_info in alloc_data_chunk_ondemand used to be
acquired from the inode. At that point commit
99f95131751d ("Btrfs: deal with NULL space info") got introduced to deal with
spurios cases where the space info could be null, following a rebalance.
Nowadays, however, the space info is referenced directly from the btrfs_fs_info
struct which is initialised at filesystem mount time. This makes the null
checks redundant, so remove them.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c