Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jan 2009 11:47:39 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r187386 - in stable/7/sys: . contrib/pf dev/cxgb gnu/fs/ext2fs
Message-ID:  <200901181147.n0IBleOi072346@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Jan 18 11:47:39 2009
New Revision: 187386
URL: http://svn.freebsd.org/changeset/base/187386

Log:
  MFC r186740:
  Do not incorrectly add the low 5 bits of the offset to the resulting
  position of the found zero bit.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/gnu/fs/ext2fs/ext2_bitops.h

Modified: stable/7/sys/gnu/fs/ext2fs/ext2_bitops.h
==============================================================================
--- stable/7/sys/gnu/fs/ext2fs/ext2_bitops.h	Sun Jan 18 11:43:23 2009	(r187385)
+++ stable/7/sys/gnu/fs/ext2fs/ext2_bitops.h	Sun Jan 18 11:47:39 2009	(r187386)
@@ -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?200901181147.n0IBleOi072346>