summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-01-12 17:21:05 +0300
committerDavid Sterba <dsterba@suse.com>2018-03-26 16:09:37 +0300
commitda07d4ab33e6207f77615acc4c17a19a4793980d (patch)
treed38b3f009839c3a87a4f7c14dd2f78e358ed6406 /include/linux
parentb1b8e38622ea044ccdee0460253e428cb6e9038e (diff)
downloadlinux-da07d4ab33e6207f77615acc4c17a19a4793980d.tar.xz
btrfs: Streamline btrfs_delalloc_reserve_metadata initial operations
The behavior of btrfs_delalloc_reserve_metadata depends on whether the inode we are allocating for is the freespace inode or not. As it stands if we are the free node we set 'flush' and 'delalloc_lock' variable to certain values. Subsequently we check the values of those vars and act accordingly. Instead, simplify things by having 1 if which checks whether we are the freespace inode or not and do any specific operation in either branches of that if. This makes the code a bit easier to understand, as an added bonus it also shrinks the compiled size: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-17 (-17) Function old new delta btrfs_delalloc_reserve_metadata 1876 1859 -17 Total: Before=85966, After=85949, chg -0.02% No functional changes. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Edmund Nadolski <enadolski@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions