Set default options before parsing
authorTej Chajed <tchajed@mit.edu>
Thu, 13 Apr 2017 21:23:33 +0000 (17:23 -0400)
committerNikolaus Rath <Nikolaus@rath.org>
Fri, 14 Apr 2017 20:29:18 +0000 (13:29 -0700)
lib/fuse.c

index d08bc49fd350dbe7ff1c59c710acc0dbd8036244..2ab5b552e4c14e4e8b404cb69d574b2dce2ef76c 100644 (file)
@@ -4610,6 +4610,11 @@ struct fuse *fuse_new(struct fuse_args *args,
                goto out;
        }
 
+       f->conf.entry_timeout = 1.0;
+       f->conf.attr_timeout = 1.0;
+       f->conf.negative_timeout = 0.0;
+       f->conf.intr_signal = FUSE_DEFAULT_INTR_SIGNAL;
+
        /* Parse options */
        if (fuse_opt_parse(args, &f->conf, fuse_lib_opts,
                           fuse_lib_opt_proc) == -1)
@@ -4648,11 +4653,6 @@ struct fuse *fuse_new(struct fuse_args *args,
                llop.setlk = NULL;
        }
 
-       f->conf.entry_timeout = 1.0;
-       f->conf.attr_timeout = 1.0;
-       f->conf.negative_timeout = 0.0;
-       f->conf.intr_signal = FUSE_DEFAULT_INTR_SIGNAL;
-
        f->pagesize = getpagesize();
        init_list_head(&f->partial_slabs);
        init_list_head(&f->full_slabs);