From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 11:47:40 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F94C1065703; Sun, 18 Jan 2009 11:47:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C6098FC1C; Sun, 18 Jan 2009 11:47:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0IBle8J072347; Sun, 18 Jan 2009 11:47:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0IBleOi072346; Sun, 18 Jan 2009 11:47:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901181147.n0IBleOi072346@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 18 Jan 2009 11:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187386 - in stable/7/sys: . contrib/pf dev/cxgb gnu/fs/ext2fs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 11:47:40 -0000 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; }