fusefs: minor optimization to interrupted fuse operations

If the daemon is known to ignore FUSE_INTERRUPT, then we may as well block
all signals while waiting for a response.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Alan Somers 2019-05-10 16:31:51 +00:00
parent fd182076ff
commit d5024ba275
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/fuse2/; revision=347434

View File

@ -442,7 +442,13 @@ fticket_wait_answer(struct fuse_ticket *ftick)
int err = 0, stops_deferred;
struct fuse_data *data;
SIGEMPTYSET(blockedset);
if (fsess_isimpl(ftick->tk_data->mp, FUSE_INTERRUPT)) {
SIGEMPTYSET(blockedset);
} else {
/* May as well block all signals */
SIGFILLSET(blockedset);
SIGDELSET(blockedset, SIGKILL);
}
stops_deferred = sigdeferstop(SIGDEFERSTOP_SILENT);
kern_sigprocmask(td, SIG_BLOCK, NULL, &oldset, 0);