btrfs-progs/tune
Qu Wenruo ace7d241cc btrfs-progs: tune: fix the missing close() of filesystem fd
[BUG]
In "btrfs tune" subcommand, we're using open_ctree_fd(), which
requires passing a valid fd, and the caller is responsible to properly
handling the lifespan of the fd.

But we just call close_ctree() and btrfs_close_all_devices(), without
closing the fd.

[FIX]
Just manually close the fd.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2024-02-08 08:30:37 +01:00
..
change-csum.c btrfs-progs: fix all variable shadowing 2023-10-10 19:16:29 +02:00
change-metadata-uuid.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
change-uuid.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
convert-bgt.c btrfs-progs: properly reserve metadata space for bgt conversion 2023-10-10 19:15:35 +02:00
main.c btrfs-progs: tune: fix the missing close() of filesystem fd 2024-02-08 08:30:37 +01:00
quota.c btrfs-progs: drop btrfs_init_path 2023-10-03 01:11:56 +02:00
seeding.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
tune.h btrfs-progs: tune: recover from failed btrfstune -m|M 2023-10-03 01:11:55 +02:00