]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/pipe.c
pipe: fix failure to return error code on ->confirm()
[net-next-2.6.git] / fs / pipe.c
index 279eef96c51cdf28a81d4f0c3d0d702a71dc5a1c..37eb1ebeaa906ea068f940e6298f8cd632feacb4 100644 (file)
--- 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;
                        }