From owner-svn-src-head@FreeBSD.ORG Wed Jan 22 19:09:42 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B70FF69; Wed, 22 Jan 2014 19:09:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2EA1918A6; Wed, 22 Jan 2014 19:09:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0MJ9gOK018779; Wed, 22 Jan 2014 19:09:42 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0MJ9fAn018776; Wed, 22 Jan 2014 19:09:41 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401221909.s0MJ9fAn018776@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 22 Jan 2014 19:09:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261034 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2014 19:09:42 -0000 Author: pfg Date: Wed Jan 22 19:09:41 2014 New Revision: 261034 URL: http://svnweb.freebsd.org/changeset/base/261034 Log: ext2fs: fix logic error in the previous change. Use the bitwise negation instead of bogus boolean negation and move the flag manipulation with the assignment. Fix some grammatical errors introduced in the same change. Reported by: bde MFC after: 3 days Modified: head/sys/fs/ext2fs/ext2_lookup.c head/sys/fs/ext2fs/ext2_subr.c head/sys/fs/ext2fs/ext2_vnops.c Modified: head/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- head/sys/fs/ext2fs/ext2_lookup.c Wed Jan 22 17:50:43 2014 (r261033) +++ head/sys/fs/ext2fs/ext2_lookup.c Wed Jan 22 19:09:41 2014 (r261034) @@ -888,9 +888,9 @@ ext2_direnter(struct inode *ip, struct v if (ext2_htree_has_idx(dp)) { error = ext2_htree_add_entry(dvp, &newdir, cnp); if (error) { - /* XXX: These seem to be set in the wrong place. */ - dp->i_flags |= IN_CHANGE | IN_UPDATE; + /* XXX: These are set in the wrong place. */ dp->i_flags &= ~E4_INDEX; + dp->i_flags |= IN_CHANGE | IN_UPDATE; } return (error); } Modified: head/sys/fs/ext2fs/ext2_subr.c ============================================================================== --- head/sys/fs/ext2fs/ext2_subr.c Wed Jan 22 17:50:43 2014 (r261033) +++ head/sys/fs/ext2fs/ext2_subr.c Wed Jan 22 19:09:41 2014 (r261034) @@ -82,7 +82,7 @@ ext2_blkatoff(struct vnode *vp, off_t of *bpp = NULL; /* - * E4_EXTENTS requires special treatment otherwise we can fall + * E4_EXTENTS requires special treatment as we can otherwise fall * back to the normal path. */ if (!(ip->i_flags & E4_EXTENTS)) Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Wed Jan 22 17:50:43 2014 (r261033) +++ head/sys/fs/ext2fs/ext2_vnops.c Wed Jan 22 19:09:41 2014 (r261034) @@ -343,9 +343,8 @@ ext2_getattr(struct vop_getattr_args *ap vap->va_birthtime.tv_sec = ip->i_birthtime; vap->va_birthtime.tv_nsec = ip->i_birthnsec; } - vap->va_flags = ip->i_flags; - /* E4_* flags are private to the driver */ - vap->va_flags &= !(E4_INDEX | E4_EXTENTS); + /* E4_* flags are private to the filesystem. */ + vap->va_flags = ip->i_flags & ~(E4_INDEX | E4_EXTENTS); vap->va_gen = ip->i_gen; vap->va_blocksize = vp->v_mount->mnt_stat.f_iosize; vap->va_bytes = dbtob((u_quad_t)ip->i_blocks);