[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 078/109] virtiofsd: fix error handling in main()
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PATCH v2 078/109] virtiofsd: fix error handling in main() |
Date: |
Tue, 21 Jan 2020 12:24:02 +0000 |
From: Liu Bo <address@hidden>
Neither fuse_parse_cmdline() nor fuse_opt_parse() goes to the right place
to do cleanup.
Signed-off-by: Liu Bo <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
---
tools/virtiofsd/passthrough_ll.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index 3b60e61c74..4e01a37ddb 100644
--- a/tools/virtiofsd/passthrough_ll.c
+++ b/tools/virtiofsd/passthrough_ll.c
@@ -2443,13 +2443,14 @@ int main(int argc, char *argv[])
lo_map_init(&lo.fd_map);
if (fuse_parse_cmdline(&args, &opts) != 0) {
- return 1;
+ goto err_out1;
}
fuse_set_log_func(log_func);
use_syslog = opts.syslog;
if (use_syslog) {
openlog("virtiofsd", LOG_PID, LOG_DAEMON);
}
+
if (opts.show_help) {
printf("usage: %s [options]\n\n", argv[0]);
fuse_cmdline_help();
@@ -2468,7 +2469,7 @@ int main(int argc, char *argv[])
}
if (fuse_opt_parse(&args, &lo, lo_opts, NULL) == -1) {
- return 1;
+ goto err_out1;
}
/*
--
2.24.1
- [PATCH v2 069/109] virtiofsd: passthrough_ll: disable readdirplus on cache=never, (continued)
- [PATCH v2 069/109] virtiofsd: passthrough_ll: disable readdirplus on cache=never, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 071/109] virtiofsd: rename unref_inode() to unref_inode_lolocked(), Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 072/109] virtiofsd: fail when parent inode isn't known in lo_do_lookup(), Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 070/109] virtiofsd: passthrough_ll: control readdirplus, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 073/109] virtiofsd: extract root inode init into setup_root(), Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 074/109] virtiofsd: passthrough_ll: clean up cache related options, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 075/109] virtiofsd: passthrough_ll: use hashtable, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 076/109] virtiofsd: Clean up inodes on destroy, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 077/109] virtiofsd: support nanosecond resolution for file timestamp, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 078/109] virtiofsd: fix error handling in main(),
Dr. David Alan Gilbert (git) <=
- [PATCH v2 079/109] virtiofsd: cleanup allocated resource in se, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 080/109] virtiofsd: fix memory leak on lo.source, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 081/109] virtiofsd: add helper for lo_data cleanup, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 082/109] virtiofsd: Prevent multiply running with same vhost_user_socket, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 083/109] virtiofsd: enable PARALLEL_DIROPS during INIT, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 084/109] virtiofsd: fix incorrect error handling in lo_do_lookup, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 085/109] Virtiofsd: fix memory leak on fuse queueinfo, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 086/109] virtiofsd: Support remote posix locks, Dr. David Alan Gilbert (git), 2020/01/21
- [PATCH v2 088/109] virtiofsd: prevent fv_queue_thread() vs virtio_loop() races, Dr. David Alan Gilbert (git), 2020/01/21