]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
pipe: fix failure to return error code on ->confirm()
authorNicolas Kaiser <nikai@nikai.net>
Thu, 21 Oct 2010 12:56:00 +0000 (14:56 +0200)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 6 Jan 2011 23:08:22 +0000 (18:08 -0500)
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: Paul Gortmaker <paul.gortmaker@windriver.com>
fs/pipe.c

index 37ba29ff3158aca16ff0febd65fdb3cce24152d6..8087027e9ccbfab01695699c8e524e9331edbe59 100644 (file)
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -363,7 +363,7 @@ pipe_read(struct kiocb *iocb, const struct iovec *_iov,
                        error = ops->confirm(pipe, buf);
                        if (error) {
                                if (!ret)
-                                       error = ret;
+                                       ret = error;
                                break;
                        }