linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs: return error on error condition
@ 2010-10-20 14:50 Nicolas Kaiser
  2010-10-21  9:16 ` Américo Wang
  2010-10-21  9:20 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Nicolas Kaiser @ 2010-10-20 14:50 UTC (permalink / raw)
  To: Alexander Viro; +Cc: Jens Axboe, linux-fsdevel, linux-kernel

It's intended to return an error, right?

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
---
 fs/pipe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/pipe.c b/fs/pipe.c
index 279eef9..37eb1eb 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;
 			}
 
-- 
1.7.2.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fs: return error on error condition
  2010-10-20 14:50 [PATCH] fs: return error on error condition Nicolas Kaiser
@ 2010-10-21  9:16 ` Américo Wang
  2010-10-21  9:20 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Américo Wang @ 2010-10-21  9:16 UTC (permalink / raw)
  To: Nicolas Kaiser; +Cc: Alexander Viro, Jens Axboe, linux-fsdevel, linux-kernel

On Wed, Oct 20, 2010 at 04:50:47PM +0200, Nicolas Kaiser wrote:
>It's intended to return an error, right?
>
>Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
>---
> fs/pipe.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/fs/pipe.c b/fs/pipe.c
>index 279eef9..37eb1eb 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;
> 			}
> 

Wow, I think you are right. :)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fs: return error on error condition
  2010-10-20 14:50 [PATCH] fs: return error on error condition Nicolas Kaiser
  2010-10-21  9:16 ` Américo Wang
@ 2010-10-21  9:20 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2010-10-21  9:20 UTC (permalink / raw)
  To: Nicolas Kaiser
  Cc: Alexander Viro, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org

On 2010-10-20 16:50, Nicolas Kaiser wrote:
> It's intended to return an error, right?
> 
> Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
> ---
>  fs/pipe.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/pipe.c b/fs/pipe.c
> index 279eef9..37eb1eb 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;
>  			}
>  

Thanks, that is indeed a bug. I'll commit and mark for stable.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-21  9:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-20 14:50 [PATCH] fs: return error on error condition Nicolas Kaiser
2010-10-21  9:16 ` Américo Wang
2010-10-21  9:20 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).