fs: return error on error condition
PATCH 1/1 fs: return error on error condition
It's intended to return an error, right?
Signed-off-by Nicolas Kaiser <[email protected]>
--- fs/pipe.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/pipe.c +1 -1
@@ -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 ; }
Signature · 1 line
1.7.2.2
Quoted 12 lines · Nicolas Kaiser
It's intended to return an error, right?
Signed-off-by Nicolas Kaiser <[email protected]>---
fs/pipe.c| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)fs/pipe.c +0
-0
fs/pipe.c pipe_read(struct kiocb *iocb, const struct iovec *_iov, · line 388
Quoted 8 lines
fs/pipe.c +1
-1@@ -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 ; }
Wow, I think you are right. :)
Quoted 12 lines · Nicolas Kaiser
It's intended to return an error, right?
Signed-off-by Nicolas Kaiser <[email protected]>--- fs/pipe.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)fs/pipe.c +0
-0
fs/pipe.c pipe_read(struct kiocb *iocb, const struct iovec *_iov, · line 388
Quoted 8 lines
fs/pipe.c +1
-1@@ -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 ; }
Thanks, that is indeed a bug. I'll commit and mark for stable.
Signature · 1 line
Jens Axboe