]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Remove invalid null checks from btrfs_cleanup_dirty_bgs
authorNikolay Borisov <nborisov@suse.com>
Thu, 8 Feb 2018 16:25:17 +0000 (18:25 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Mar 2018 13:09:34 +0000 (15:09 +0200)
commit3fd77ed30dbdd5f6f27f2a66555087e262102ac6
treeaf6cf80ca87a3cf2fa9004e514a130123ff372a3
parente4ee399af173e6538a3a63fa9d027b40ce495682
btrfs: Remove invalid null checks from btrfs_cleanup_dirty_bgs

list_first_entry is essentially a wrapper over cotnainer_of. The latter
can never return null even if it's working on inconsistent list since it
will either crash or return some offset in the wrong struct.
Additionally, for the dirty_bgs list the iteration is done under
dirty_bgs_lock which ensures consistency of the list.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c