Author: pfg
Date: Sat Jan 26 21:50:52 2013
New Revision: 245950
URL: http://svnweb.freebsd.org/changeset/base/245950

Log:
  Cosmetical off-by-one
  
  Technically, the case when all the blocks are released
  is not a sanity check.
  Move further the comment while here.
  
  Suggested by: bde
  MFC after:    3 days

Modified:
  head/sys/fs/ext2fs/ext2_inode.c

Modified: head/sys/fs/ext2fs/ext2_inode.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_inode.c     Sat Jan 26 21:29:45 2013        
(r245949)
+++ head/sys/fs/ext2fs/ext2_inode.c     Sat Jan 26 21:50:52 2013        
(r245950)
@@ -341,9 +341,9 @@ done:
         * Put back the real size.
         */
        oip->i_size = length;
-       if (oip->i_blocks > blocksreleased)
+       if (oip->i_blocks >= blocksreleased)
                oip->i_blocks -= blocksreleased;
-       else                    /* sanity */
+       else                            /* sanity */
                oip->i_blocks = 0;
        oip->i_flag |= IN_CHANGE;
        vnode_pager_setsize(ovp, length);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to