Commit ce128de6 authored by Maxim Patlasov's avatar Maxim Patlasov Committed by Miklos Szeredi
Browse files

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: default avatarMaxim Patlasov <>
Signed-off-by: default avatarMiklos Szeredi <>
parent 41b6e41f
...@@ -1505,6 +1505,7 @@ static void fuse_writepage_end(struct fuse_conn *fc, struct fuse_req *req) ...@@ -1505,6 +1505,7 @@ static void fuse_writepage_end(struct fuse_conn *fc, struct fuse_req *req)
struct fuse_req *next = req->; struct fuse_req *next = req->;
req-> = next->; req-> = next->;
next-> = NULL; next-> = NULL;
next->ff = fuse_file_get(req->ff);
list_add(&next->writepages_entry, &fi->writepages); list_add(&next->writepages_entry, &fi->writepages);
/* /*
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment