summaryrefslogtreecommitdiffstats
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
authorChad Austin2018-12-10 19:54:52 +0100
committerMiklos Szeredi2018-12-11 21:47:28 +0100
commit2e64ff154ce6ce9a8dc0f9556463916efa6ff460 (patch)
tree59b4c2e0a6f2cebd6130ac56cc921981b2f6ba92 /fs/fuse/dir.c
parentfuse: Fix memory leak in fuse_dev_free() (diff)
downloadkernel-qcow2-linux-2e64ff154ce6ce9a8dc0f9556463916efa6ff460.tar.gz
kernel-qcow2-linux-2e64ff154ce6ce9a8dc0f9556463916efa6ff460.tar.xz
kernel-qcow2-linux-2e64ff154ce6ce9a8dc0f9556463916efa6ff460.zip
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>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r--fs/fuse/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index dc4e83d8ace7..e909678afa2d 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1243,7 +1243,7 @@ static int fuse_dir_open(struct inode *inode, struct file *file)
static int fuse_dir_release(struct inode *inode, struct file *file)
{
- fuse_release_common(file, FUSE_RELEASEDIR);
+ fuse_release_common(file, true);
return 0;
}