Messages in this thread Patch in this message | | | Subject | [PATCH 4/5] fuse: enable close_wait feature | From | Maxim Patlasov <> | Date | Fri, 06 Jun 2014 17:30:00 +0400 |
| |
The patch enables feature by passing 'true' to fuse_file_put in fuse_release_common.
Previously, this was safe only in special cases when we sure that multi-threaded userspace won't deadlock if we'll synchronously send FUSE_RELEASE in the context of read-ahead or write-back callback. Now, it's always safe because callbacks don't send requests to userspace anymore.
Signed-off-by: Maxim Patlasov <mpatlasov@parallels.com> --- fs/fuse/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index d50af99..783cb52 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -328,7 +328,8 @@ void fuse_release_common(struct file *file, int opcode) * synchronous RELEASE is allowed (and desirable) in this case * because the server can be trusted not to screw up. */ - fuse_file_put(ff, ff->fc->destroy_req != NULL); + fuse_file_put(ff, ff->fc->destroy_req != NULL || + ff->fc->close_wait); } static int fuse_open(struct inode *inode, struct file *file)
| |