Date: Sun, 22 Feb 2015 01:43:31 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279132 - stable/9/sys/fs/ext2fs Message-ID: <201502220143.t1M1hVrZ007294@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Sun Feb 22 01:43:30 2015 New Revision: 279132 URL: https://svnweb.freebsd.org/changeset/base/279132 Log: MFC r278791: Reuse value of cursize instead of recalculating. Reported by: Clang static checker Modified: stable/9/sys/fs/ext2fs/ext2_htree.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_htree.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_htree.c Sun Feb 22 01:42:45 2015 (r279131) +++ stable/9/sys/fs/ext2fs/ext2_htree.c Sun Feb 22 01:43:30 2015 (r279132) @@ -861,7 +861,7 @@ ext2_htree_add_entry(struct vnode *dvp, ext2_htree_split_dirblock((char *)bp->b_data, newdirblock, blksize, fs->e3fs_hash_seed, hash_version, &split_hash, entry); cursize = roundup(ip->i_size, blksize); - dirsize = roundup(ip->i_size, blksize) + blksize; + dirsize = cursize + blksize; blknum = dirsize / blksize - 1; /* Add index entry for the new directory block */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502220143.t1M1hVrZ007294>