Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f6fbf7c

Browse files
committed
fuse: fix connection abort on mmap when fuse server returns ENOSYS
Check whether dlm is still enabled when interpreting the returned error from fuse server. Signed-off-by: Horst Birthelmer <[email protected]>
1 parent 0bc2f9c commit f6fbf7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/fuse/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2247,7 +2247,7 @@ static int fuse_get_page_mkwrite_lock(struct file *file, loff_t offset, size_t l
22472247
err = 0;
22482248
}
22492249

2250-
if (!err && outarg.locksize < length) {
2250+
if (!err && fc->dlm && outarg.locksize < length) {
22512251
/* fuse server is seriously broken */
22522252
pr_warn("fuse: dlm lock request for %lu bytes returned %u bytes\n",
22532253
length, outarg.locksize);

0 commit comments

Comments
 (0)