]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 11 Dec 2018 20:47:28 +0000 (21:47 +0100)
commiteac44bf743e1f7b52433212e8e269ce277e52173
tree59b4c2e0a6f2cebd6130ac56cc921981b2f6ba92
parent94cdd617274224a7fddae610b264eef74f6930f2
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: aab62205923c ("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>
fs/fuse/dir.c
fs/fuse/file.c
fs/fuse/fuse_i.h