fuse/fuse-exit-when-got-EINVAL-error.patch
2019-09-30 10:39:10 -04:00

30 lines
925 B
Diff

From 0aa4f47172f5f9a5001be8cda988b89d4d54874c Mon Sep 17 00:00:00 2001
From: <mashimiao@huawei.com>
Date: Tue, 4 Dec 2018 14:11:31 +0800
Subject: [PATCH] fuse: exit when got EINVAL error
Signed-off-by: <mashimiao@huawei.com>
---
lib/fuse_kern_chan.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libfuse-fuse-2.9.7/lib/fuse_kern_chan.c b/libfuse-fuse-2.9.7/lib/fuse_kern_chan.c
index 1096fa3..dc964e1 100644
--- a/libfuse-fuse-2.9.7/lib/fuse_kern_chan.c
+++ b/libfuse-fuse-2.9.7/lib/fuse_kern_chan.c
@@ -72,6 +72,11 @@ static int fuse_kern_chan_send(struct fuse_chan *ch, const struct iovec iov[],
assert(se != NULL);
+ /* EINVAL means can not reply the request any more */
+ if (err == EINVAL) {
+ fuse_session_exit(se);
+ return 0;
+ }
/* ENOENT means the operation was interrupted */
if (!fuse_session_exited(se) && err != ENOENT)
perror("fuse: writing device");
--
1.8.3.1