Skip to content

Commit

Permalink
fuse: writepages: protect secondary requests from fuse file release
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maxim Patlasov authored and Miklos Szeredi committed Nov 5, 2013
1 parent 41b6e41 commit ce128de
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1505,6 +1505,7 @@ static void fuse_writepage_end(struct fuse_conn *fc, struct fuse_req *req)
struct fuse_req *next = req->misc.write.next;
req->misc.write.next = next->misc.write.next;
next->misc.write.next = NULL;
next->ff = fuse_file_get(req->ff);
list_add(&next->writepages_entry, &fi->writepages);

/*
Expand Down

0 comments on commit ce128de

Please sign in to comment.