svn commit: r279132 - stable/9/sys/fs/ext2fs
Pedro F. Giffuni
pfg at FreeBSD.org
Sun Feb 22 01:43:31 UTC 2015
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 */
More information about the svn-src-stable-9
mailing list