From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Am=C3=A9rico?= Wang Subject: Re: [PATCH] fs: return error on error condition Date: Thu, 21 Oct 2010 17:16:42 +0800 Message-ID: <20101021091642.GD5329@cr0.nay.redhat.com> References: <20101020165047.09150171@absol.kitzblitz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Viro , Jens Axboe , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Nicolas Kaiser Return-path: Received: from mail-iw0-f174.google.com ([209.85.214.174]:61835 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751531Ab0JUJMF (ORCPT ); Thu, 21 Oct 2010 05:12:05 -0400 Content-Disposition: inline In-Reply-To: <20101020165047.09150171@absol.kitzblitz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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 >--- > 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. :)