]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: simplify root lookup by id
authorDavid Sterba <dsterba@suse.com>
Fri, 15 May 2020 17:35:55 +0000 (19:35 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 May 2020 09:25:36 +0000 (11:25 +0200)
commitbd0a5bc52c523e75ef72e89992fd5258488ba674
treee89265fd992d94c54fffb639cf4ee39bd268cfdb
parentedf065be7ce0420fdcfcb2fc12ee27fd7858b2d9
btrfs: simplify root lookup by id

The main function to lookup a root by its id btrfs_get_fs_root takes the
whole key, while only using the objectid. The value of offset is preset
to (u64)-1 but not actually used until btrfs_find_root that does the
actual search.

Switch btrfs_get_fs_root to use only objectid and remove all local
variables that existed just for the lookup. The actual key for search is
set up in btrfs_get_fs_root, reusing another key variable.

Signed-off-by: David Sterba <dsterba@suse.com>
15 files changed:
fs/btrfs/backref.c
fs/btrfs/disk-io.c
fs/btrfs/disk-io.h
fs/btrfs/export.c
fs/btrfs/file.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/relocation.c
fs/btrfs/root-tree.c
fs/btrfs/scrub.c
fs/btrfs/send.c
fs/btrfs/super.c
fs/btrfs/transaction.c
fs/btrfs/tree-log.c
fs/btrfs/uuid-tree.c