btrfs: move btrfs_get_free_objectid() call into btrfs_new_inode()
authorOmar Sandoval <osandov@fb.com>
Thu, 10 Mar 2022 01:31:41 +0000 (17:31 -0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 May 2022 15:03:06 +0000 (17:03 +0200)
commit6437d45835315a36cde09609314da1768a71c299
treea6975014bd7c88aabd3b1828574733510e2813e8
parent23c24ef8e4181ba5cb56316a17b920deedbbb109
btrfs: move btrfs_get_free_objectid() call into btrfs_new_inode()

Every call of btrfs_new_inode() is immediately preceded by a call to
btrfs_get_free_objectid(). Since getting an inode number is part of
creating a new inode, this is better off being moved into
btrfs_new_inode(). While we're here, get rid of the comment about
reclaiming inode numbers, since we only did that when using the ino
cache, which was removed by commit 5297199a8bca ("btrfs: remove inode
number cache feature").

Reviewed-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c