linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: lkml <linux-kernel@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH] UDF: Fix incorrect error handling in udf_direct_IO()
Date: Thu, 6 Sep 2012 16:22:31 +0200	[thread overview]
Message-ID: <20120906142231.GA12539@quack.suse.cz> (raw)
In-Reply-To: <1346926091-3654-1-git-send-email-abbotti@mev.co.uk>

On Thu 06-09-12 11:08:11, Ian Abbott wrote:
> My recent patch to add DIRECT_IO support to the UDF filesystem handler
> contains a mistake in the error recovery if blockdev_direct_IO() fails.
> The test `rw && WRITE` should be `rw & WRITE`.  Fix it.
> 
> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
  Thanks. I've folded the change into your patch.

								Honza

> ---
>  fs/udf/inode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/udf/inode.c b/fs/udf/inode.c
> index b905448..41d5830 100644
> --- a/fs/udf/inode.c
> +++ b/fs/udf/inode.c
> @@ -156,7 +156,7 @@ static ssize_t udf_direct_IO(int rw, struct kiocb *iocb,
>  
>  	ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
>  				  udf_get_block);
> -	if (unlikely(ret < 0 && (rw && WRITE)))
> +	if (unlikely(ret < 0 && (rw & WRITE)))
>  		udf_write_failed(mapping, offset + iov_length(iov, nr_segs));
>  	return ret;
>  }
> -- 
> 1.7.12
> 
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

      reply	other threads:[~2012-09-06 14:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-24 12:17 [PATCH] UDF: Add support for O_DIRECT Ian Abbott
2012-07-31 10:40 ` [PATCH v2] " Ian Abbott
2012-09-04  9:49   ` [PATCH v3] " Ian Abbott
2012-09-04 14:39     ` Jan Kara
2012-09-04 15:11       ` Ian Abbott
2012-09-05  9:03         ` Ian Abbott
2012-09-05 12:05         ` Jan Kara
2012-09-05 12:55           ` Jan Kara
2012-09-05 16:00             ` Jan Kara
2012-09-05 16:44               ` [PATCH v4] " Ian Abbott
2012-09-05 19:02                 ` Jan Kara
2012-09-06 10:08                   ` [PATCH] UDF: Fix incorrect error handling in udf_direct_IO() Ian Abbott
2012-09-06 14:22                     ` Jan Kara [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120906142231.GA12539@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=abbotti@mev.co.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).