On Tue, Dec 18, 2018 at 04:00:39PM +0100, gregkh@linuxfoundation.org wrote:
The patch below does not apply to the 4.9-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to stable@vger.kernel.org.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 2e64ff154ce6ce9a8dc0f9556463916efa6ff460 Mon Sep 17 00:00:00 2001 From: Chad Austin chadaustin@fb.com Date: Mon, 10 Dec 2018 10:54:52 -0800 Subject: [PATCH] fuse: continue to send FUSE_RELEASEDIR when FUSE_OPEN returns ENOSYS
When FUSE_OPEN returns ENOSYS, the no_open bit is set on the connection.
Because the FUSE_RELEASE and FUSE_RELEASEDIR paths share code, this incorrectly caused the FUSE_RELEASEDIR request to be dropped and never sent to userspace.
Pass an isdir bool to distinguish between FUSE_RELEASE and FUSE_RELEASEDIR inside of fuse_file_put.
Fixes: 7678ac50615d ("fuse: support clients that don't implement 'open'") Cc: stable@vger.kernel.org # v3.14 Signed-off-by: Chad Austin chadaustin@fb.com Signed-off-by: Miklos Szeredi mszeredi@redhat.com
On older kernels this patch depends on the following two:
9a87ad3da905 fuse: release: private_data cannot be NULL 267d84449f52 fuse: cleanup fuse_file refcounting
But I'm not sure about taking them as is.
-- Thanks, Sasha