svn commit: r279131 - stable/10/sys/fs/ext2fs

Pedro F. Giffuni pfg at FreeBSD.org
Sun Feb 22 01:42:46 UTC 2015


Author: pfg
Date: Sun Feb 22 01:42:45 2015
New Revision: 279131
URL: https://svnweb.freebsd.org/changeset/base/279131

Log:
  MFC	r278791:
  Reuse value of cursize instead of recalculating.
  
  Reported by:	Clang static checker

Modified:
  stable/10/sys/fs/ext2fs/ext2_htree.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/ext2fs/ext2_htree.c
==============================================================================
--- stable/10/sys/fs/ext2fs/ext2_htree.c	Sun Feb 22 01:32:37 2015	(r279130)
+++ stable/10/sys/fs/ext2fs/ext2_htree.c	Sun Feb 22 01:42:45 2015	(r279131)
@@ -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 mailing list