]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: remove force argument from run_delalloc_nocow()
authorGoldwyn Rodrigues <rgoldwyn@suse.de>
Thu, 4 Mar 2021 15:06:25 +0000 (09:06 -0600)
committerDavid Sterba <dsterba@suse.com>
Tue, 6 Apr 2021 13:35:53 +0000 (15:35 +0200)
commitf2b41dd249492d657bbaa25e1321da7d1bb404d2
treefd957211dbae6ddcb3bc17dc048011d792a14ca2
parent69179a88f269ec84be658ae02002abf4f9ede3b6
btrfs: remove force argument from run_delalloc_nocow()

force_cow can be calculated from inode and does not need to be passed as
an argument.

This simplifies run_delalloc_nocow() call from btrfs_run_delalloc_range()
A new function, should_nocow() checks if the range should be NOCOWed or
not. The function returns true iff either BTRFS_INODE_NODATA or
BTRFS_INODE_PREALLOC, but is not a defrag extent.

Tested-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c