ioctl: do not reuse fi->fh for directories

for directories, it points to a structure, not an open file
descriptor.

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
This commit is contained in:
Giuseppe Scrivano 2019-09-23 22:34:13 +02:00
parent b0a9bdaa64
commit 20e8529c4e
No known key found for this signature in database
GPG Key ID: 67E38F7A8BA21772

3
main.c
View File

@ -4600,7 +4600,8 @@ ovl_ioctl (fuse_req_t req, fuse_ino_t ino, unsigned int cmd, void *arg,
{
case FS_IOC_GETVERSION:
case FS_IOC_GETFLAGS:
fd = fi->fh;
if (! node_dirp (node))
fd = fi->fh;
break;
case FS_IOC_SETVERSION: