提交 222f1d69 编写于 作者: M Miklos Szeredi 提交者: Linus Torvalds

[PATCH] fuse: fuse_copy_finish() order fix

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: NMiklos Szeredi <miklos@szeredi.hu>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 f87fd4c2
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册