lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 06 Sep 2006 12:42:55 -0500
From:	Dave Kleikamp <shaggy@...tin.ibm.com>
To:	Badari Pulavarty <pbadari@...ibm.com>
Cc:	akpm@...l.org, lkml <linux-kernel@...r.kernel.org>,
	ext4 <linux-ext4@...r.kernel.org>,
	Will Simoneau <simoneau@....uri.edu>, cmm@...ibm.com
Subject: Re: [PATCH] ext3_getblk should handle HOLE correctly

On Wed, 2006-09-06 at 10:39 -0700, Badari Pulavarty wrote:

> Index: linux-2.6.18-rc5/fs/ext3/inode.c
> ===================================================================
> --- linux-2.6.18-rc5.orig/fs/ext3/inode.c	2006-08-27 20:41:48.000000000 -0700
> +++ linux-2.6.18-rc5/fs/ext3/inode.c	2006-09-05 15:32:57.000000000 -0700
> @@ -1009,11 +1009,12 @@ struct buffer_head *ext3_getblk(handle_t
>  	buffer_trace_init(&dummy.b_history);
>  	err = ext3_get_blocks_handle(handle, inode, block, 1,
>  					&dummy, create, 1);
> -	if (err == 1) {
> +	/*
> +	 * ext3_get_blocks_handle() returns number of blocks
> +	 * mapped. 0 in case of a HOLE.
> +	 */
> +	if (err > 0) {
>  		err = 0;
> -	} else if (err >= 0) {
> -		WARN_ON(1);
> -		err = -EIO;
>  	}

I'd get rid of the {} too.

>  	*errp = err;
>  	if (!err && buffer_mapped(&dummy)) {

-- 
David Kleikamp
IBM Linux Technology Center

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ