]> git.ipfire.org Git - people/ms/linux.git/commit - fs/btrfs/tree-log.c
btrfs: simplify iget helpers
authorDavid Sterba <dsterba@suse.com>
Fri, 15 May 2020 17:35:59 +0000 (19:35 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 May 2020 09:25:37 +0000 (11:25 +0200)
commit0202e83fdab05b3bf641804afea57a2bfcbcbd70
treedba2e65e5900efb282f131cae714ae11d13f5412
parenta820feb546842a4ab5678279a62d4450320e6696
btrfs: simplify iget helpers

The inode lookup starting at btrfs_iget takes the full location key,
while only the objectid is used to match the inode, because the lookup
happens inside the given root thus the inode number is unique.
The entire location key is properly set up in btrfs_init_locked_inode.

Simplify the helpers and pass only inode number, renaming it to 'ino'
instead of 'objectid'. This allows to remove temporary variables key,
saving some stack space.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/export.c
fs/btrfs/file.c
fs/btrfs/free-space-cache.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/props.c
fs/btrfs/relocation.c
fs/btrfs/send.c
fs/btrfs/super.c
fs/btrfs/tree-log.c