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 */
_______________________________________________
svn-src-stable-9@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"

Reply via email to