Projects
Eulaceura:Factory
btrfs-progs
_service:obs_scm:0008-btrfs-progs-tune-fix-the-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:0008-btrfs-progs-tune-fix-the-missing-close-of-filesystem.patch of Package btrfs-progs
From ace7d241ccf2582e832c4c4a75eb6b638a0f543b Mon Sep 17 00:00:00 2001 From: Qu Wenruo <wqu@suse.com> Date: Tue, 2 Jul 2024 10:51:55 +0800 Subject: [PATCH] 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> --- tune/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tune/main.c b/tune/main.c index 9dcb559..0fbf37d 100644 --- a/tune/main.c +++ b/tune/main.c @@ -535,6 +535,7 @@ out: } close_ctree(root); btrfs_close_all_devices(); + close(fd); free_out: return ret; -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2