]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Factor out write portion of btrfs_get_blocks_direct
authorNikolay Borisov <nborisov@suse.com>
Wed, 2 May 2018 12:19:33 +0000 (15:19 +0300)
committerDavid Sterba <dsterba@suse.com>
Wed, 30 May 2018 17:01:44 +0000 (19:01 +0200)
commitc2454b744a65d22b4ed1ed0574c213ae30df65e1
tree4415984aa73ae253d024fe7a52eb4cbc85e33448
parent65b2cc97609c8c65b4feeb2bde41d9f27e41f519
btrfs: Factor out write portion of btrfs_get_blocks_direct

Now that the read side is extracted into its own function, do the same
to the write side. This leaves btrfs_get_blocks_direct_write with the
sole purpose of handling common locking required. Also flip the
condition in btrfs_get_blocks_direct_write so that the write case
comes first and we check for if (Create) rather than if (!create). This
is purely subjective but I believe makes reading a bit more "linear".
No functional changes.

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