OSDN Git Service

btrfs: directly pass the inode to btrfs_is_data_extent_shared()
authorFilipe Manana <fdmanana@suse.com>
Tue, 11 Oct 2022 12:17:01 +0000 (13:17 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:39 +0000 (18:00 +0100)
commitceb707da9ad92ad3a5251dc13844034ded06cb3d
treeca949f905638cb25a7979b9d94d568d669f74cc7
parenta0a5472ad802d99d3fb4b361cc3fb5ea24914ee0
btrfs: directly pass the inode to btrfs_is_data_extent_shared()

Currently we pass a root and an inode number as arguments for
btrfs_is_data_extent_shared() and the inode number is always from an
inode that belongs to that root (it wouldn't make sense otherwise).
In every context that we call btrfs_is_data_extent_shared() (fiemap only),
we have an inode available, so directly pass the inode to the function
instead of a root and inode number. This reduces the number of parameters
and it makes the function's signature conform to most other functions we
have.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/backref.c
fs/btrfs/backref.h
fs/btrfs/extent_io.c