Skip to content

Commit

Permalink
tools/fs: fix fuse deadlock when iterating directories
Browse files Browse the repository at this point in the history
The fuse operations `release()` and `releasedir()` need to be confirmed
with `fuse_reply_err()` even in case of success.
  • Loading branch information
Gottox committed Jun 1, 2023
1 parent ca98392 commit 3d349fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ sqshfs_releasedir(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi) {
sqsh_inode_free(handle->inode);
sqsh_directory_iterator_free(handle->iterator);
free(handle);
fuse_reply_err(req, 0);
}

static void
Expand Down Expand Up @@ -485,6 +486,7 @@ sqshfs_release(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi) {

sqsh_inode_free(handle->inode);
free(handle);
fuse_reply_err(req, 0);
}

static void
Expand Down

0 comments on commit 3d349fe

Please sign in to comment.