Date: Wed, 23 Jan 2013 14:29:29 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245844 - head/sys/fs/ext2fs Message-ID: <201301231429.r0NETTOC028087@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Wed Jan 23 14:29:29 2013 New Revision: 245844 URL: http://svnweb.freebsd.org/changeset/base/245844 Log: ext2fs: fix a check for negative block numbers. The previous change accidentally left the substraction we were trying to avoid in case that i_blocks could become negative. Reported by: bde MFC after: 4 days Modified: head/sys/fs/ext2fs/ext2_inode.c Modified: head/sys/fs/ext2fs/ext2_inode.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode.c Wed Jan 23 14:14:13 2013 (r245843) +++ head/sys/fs/ext2fs/ext2_inode.c Wed Jan 23 14:29:29 2013 (r245844) @@ -341,10 +341,9 @@ done: * Put back the real size. */ oip->i_size = length; - 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301231429.r0NETTOC028087>