Skip to content

Commit

Permalink
[PATCH] fuse: fuse_copy_finish() order fix
Browse files Browse the repository at this point in the history
fuse_copy_finish() must be called before request_end(), since the later might
sleep, and no sleeping is allowed between fuse_copy_one() and
fuse_copy_finish() because of kmap_atomic()/kunmap_atomic() used in them.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Miklos Szeredi authored and Linus Torvalds committed Jan 17, 2006
1 parent f87fd4c commit 222f1d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,8 +773,10 @@ static ssize_t fuse_dev_writev(struct file *file, const struct iovec *iov,

list_del_init(&req->list);
if (req->interrupted) {
request_end(fc, req);
spin_unlock(&fuse_lock);
fuse_copy_finish(&cs);
spin_lock(&fuse_lock);
request_end(fc, req);
return -ENOENT;
}
req->out.h = oh;
Expand Down

0 comments on commit 222f1d6

Please sign in to comment.