]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: remove unnecessary btrfs_key local variable in btrfs_search_forward()
authorSun YangKai <sunk67188@gmail.com>
Tue, 11 Mar 2025 08:13:13 +0000 (16:13 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Mar 2025 19:35:52 +0000 (20:35 +0100)
commit10de00c7d4e3a12ffbb996e03aefcad0c107981d
treedda7af32a572d38638ddf20493f9c8791b9c566d
parent140ac522de14c1e44dde9ca69a4a1a853953c891
btrfs: remove unnecessary btrfs_key local variable in btrfs_search_forward()

The 'found_key' variable was only used to temporarily store the found key
before copying it to 'min_key' at the end of the function when returning
success.

Eliminate the 'found_key' variable, and directly store the key into
'min_key' at the exact loop exit points where ret=0 is set, maintaining
identical functionality.

Signed-off-by: Sun YangKai <sunk67188@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c