fuse: continue to send FUSE_RELEASEDIR when FUSE_OPEN returns ENOSYS
authorChad Austin <chadaustin@fb.com>
Mon, 10 Dec 2018 18:54:52 +0000 (10:54 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Dec 2018 13:13:05 +0000 (14:13 +0100)
commitc1149b873482a1f2a85659692376103e7d052dde
tree0aa1d3c811000069fc2df874383107dd450b8cf2
parent38ef9c5a931163eb8abf8f1c654d1b13de26f792
fuse: continue to send FUSE_RELEASEDIR when FUSE_OPEN returns ENOSYS

commit 2e64ff154ce6ce9a8dc0f9556463916efa6ff460 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fuse/dir.c
fs/fuse/file.c
fs/fuse/fuse_i.h