fuse: fix reserved request wake up
Use wake_up_all instead of wake_up in put_reserved_req(), otherwise it is possible that the right task is not woken up. Also create a separate reserved_req_waitq in addition to the blocked_waitq, since they fulfill totally separate functions. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
f92b99b9dc
commit
de5e3dec42
@@ -129,7 +129,7 @@ static struct fuse_req *get_reserved_req(struct fuse_conn *fc,
|
||||
struct fuse_file *ff = file->private_data;
|
||||
|
||||
do {
|
||||
wait_event(fc->blocked_waitq, ff->reserved_req);
|
||||
wait_event(fc->reserved_req_waitq, ff->reserved_req);
|
||||
spin_lock(&fc->lock);
|
||||
if (ff->reserved_req) {
|
||||
req = ff->reserved_req;
|
||||
@@ -155,7 +155,7 @@ static void put_reserved_req(struct fuse_conn *fc, struct fuse_req *req)
|
||||
fuse_request_init(req);
|
||||
BUG_ON(ff->reserved_req);
|
||||
ff->reserved_req = req;
|
||||
wake_up(&fc->blocked_waitq);
|
||||
wake_up_all(&fc->reserved_req_waitq);
|
||||
spin_unlock(&fc->lock);
|
||||
fput(file);
|
||||
}
|
||||
|
Reference in New Issue
Block a user