Commit ce128de6260f86a990ed44a697f26d0859684f28

Authored by Maxim Patlasov
Committed by Miklos Szeredi
1 parent 41b6e41fc6

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>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

... ... @@ -1505,6 +1505,7 @@
1505 1505 struct fuse_req *next = req->misc.write.next;
1506 1506 req->misc.write.next = next->misc.write.next;
1507 1507 next->misc.write.next = NULL;
  1508 + next->ff = fuse_file_get(req->ff);
1508 1509 list_add(&next->writepages_entry, &fi->writepages);
1509 1510  
1510 1511 /*