aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxim Patlasov <MPatlasov@parallels.com>2013-10-02 13:38:54 -0400
committerMiklos Szeredi <mszeredi@suse.cz>2013-11-05 04:11:29 -0500
commitce128de6260f86a990ed44a697f26d0859684f28 (patch)
treee0fb91f2aa9feddf4715eefcbd30965ce9bbcb24
parent41b6e41fc609753a9386d24295f7ed03b28c4601 (diff)
fuse: writepages: protect secondary requests from fuse file release
All async fuse requests must be supplied with extra reference to a fuse file. This is necessary to ensure that the fuse file is not released until all in-flight requests are completed. Fuse secondary writeback requests must obey this rule as well. Signed-off-by: Maxim Patlasov <MPatlasov@parallels.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
-rw-r--r--fs/fuse/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index e6fdd59a7906..7e70506297bc 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1505,6 +1505,7 @@ static void fuse_writepage_end(struct fuse_conn *fc, struct fuse_req *req)
1505 struct fuse_req *next = req->misc.write.next; 1505 struct fuse_req *next = req->misc.write.next;
1506 req->misc.write.next = next->misc.write.next; 1506 req->misc.write.next = next->misc.write.next;
1507 next->misc.write.next = NULL; 1507 next->misc.write.next = NULL;
1508 next->ff = fuse_file_get(req->ff);
1508 list_add(&next->writepages_entry, &fi->writepages); 1509 list_add(&next->writepages_entry, &fi->writepages);
1509 1510
1510 /* 1511 /*