]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Factor out common extent locking code in submit_compressed_extents
authorNikolay Borisov <nborisov@suse.com>
Tue, 12 Mar 2019 15:20:30 +0000 (17:20 +0200)
committerDavid Sterba <dsterba@suse.com>
Thu, 2 May 2019 11:48:19 +0000 (13:48 +0200)
commite58e63c6cb580670d7e08ee862994ff8e5f7b1a7
treea390453fc43d1788dacce25bbdf885192832d580
parent48f2b934a2f1b02ca9d2ac1df215dd5b292b7b4a
btrfs: Factor out common extent locking code in submit_compressed_extents

Irrespective of whether the compress code fell back to uncompressed or
a compressed extent has to be submitted, the extent range is always
locked. So factor out the common lock_extent call at the beginning of
the loop. No functional changes just removes one duplicate lock_extent
call.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
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/inode.c