Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 04 Jan 2009 22:11:23 +0000
From:      Kris Kennaway <kris@FreeBSD.org>
To:        Konstantin Belousov <kib@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r186740 - head/sys/gnu/fs/ext2fs
Message-ID:  <4961340B.5010306@FreeBSD.org>
In-Reply-To: <200901041556.n04Funod061146@svn.freebsd.org>
References:  <200901041556.n04Funod061146@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Konstantin Belousov wrote:
> Author: kib
> Date: Sun Jan  4 15:56:49 2009
> New Revision: 186740
> URL: http://svn.freebsd.org/changeset/base/186740
> 
> Log:
>   Do not incorrectly add the low 5 bits of the offset to the resulting
>   position of the found zero bit.
>   
>   Submitted by:	Jaakko Heinonen <jh saunalahti fi>
>   MFC after:	2 weeks
> 
> Modified:
>   head/sys/gnu/fs/ext2fs/ext2_bitops.h

Does this fix ext2fs on amd64?

Kris

> Modified: head/sys/gnu/fs/ext2fs/ext2_bitops.h
> ==============================================================================
> --- head/sys/gnu/fs/ext2fs/ext2_bitops.h	Sun Jan  4 15:49:30 2009	(r186739)
> +++ head/sys/gnu/fs/ext2fs/ext2_bitops.h	Sun Jan  4 15:56:49 2009	(r186740)
> @@ -84,7 +84,7 @@ find_next_zero_bit(void *data, size_t sz
>  		mask = ~0U << (ofs & 31);
>  		bit = *p | ~mask;
>  		if (bit != ~0U)
> -			return (ffs(~bit) + ofs - 1);
> +			return (ffs(~bit) + (ofs & ~31U) - 1);
>  		p++;
>  		ofs = (ofs + 31U) & ~31U;
>  	}




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4961340B.5010306>