lkml.org 
[lkml]   [2012]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] UDF: Fix incorrect error handling in udf_direct_IO()
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


\
 
 \ /
  Last update: 2012-09-06 17:42    [W:0.024 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site