aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/dev.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2006-01-17 01:14:25 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-17 02:15:29 -0500
commit222f1d69183f10d70a37de5785698fe0aa363c12 (patch)
tree14eeb42423e9feb390a52ce2cf0453c346e92b98 /fs/fuse/dev.c
parentf87fd4c2a0c4f3baad28057360b36a59591ef751 (diff)
[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: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r--fs/fuse/dev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index e08ab4702d97..9af88953db69 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -773,8 +773,10 @@ static ssize_t fuse_dev_writev(struct file *file, const struct iovec *iov,
773 773
774 list_del_init(&req->list); 774 list_del_init(&req->list);
775 if (req->interrupted) { 775 if (req->interrupted) {
776 request_end(fc, req); 776 spin_unlock(&fuse_lock);
777 fuse_copy_finish(&cs); 777 fuse_copy_finish(&cs);
778 spin_lock(&fuse_lock);
779 request_end(fc, req);
778 return -ENOENT; 780 return -ENOENT;
779 } 781 }
780 req->out.h = oh; 782 req->out.h = oh;