[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130115150355.18759.92630.stgit@maximpc.sw.ru>
Date: Tue, 15 Jan 2013 19:07:01 +0400
From: Maxim Patlasov <mpatlasov@...allels.com>
To: miklos@...redi.hu
Cc: dev@...allels.com, xemul@...allels.com,
fuse-devel@...ts.sourceforge.net, bfoster@...hat.com,
linux-kernel@...r.kernel.org, devel@...nvz.org,
anand.avati@...il.com
Subject: [PATCH] fuse: enable close_wait feature (v2)
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.
Changed in v2: update the patch to be applied cleanly on the top of
previous modified (v2) patch of the patch-set.
Signed-off-by: Maxim Patlasov <mpatlasov@...allels.com>
---
fs/fuse/file.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 150033a..83c8904 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -279,7 +279,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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists