summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Kaiser <nikai@nikai.net>2010-10-21 14:56:00 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-22 11:03:06 -0800
commit6021775fb632a6d40271c1bb2694b92df5b9a414 (patch)
treeacc3f87dff17ae0bdf09f3ccba6ee24865885f68
parent2089b63ad78385733a5512b79221cf47faf796e7 (diff)
pipe: fix failure to return error code on ->confirm()
commit e5953cbdff26f7cbae7eff30cd9b18c4e19b7594 upstream. The arguments were transposed, we want to assign the error code to 'ret', which is being returned. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Jens Axboe <jaxboe@fusionio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--fs/pipe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/pipe.c b/fs/pipe.c
index 279eef96c51c..37eb1ebeaa90 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -382,7 +382,7 @@ pipe_read(struct kiocb *iocb, const struct iovec *_iov,
error = ops->confirm(pipe, buf);
if (error) {
if (!ret)
- error = ret;
+ ret = error;
break;
}