summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2013-01-26 21:50:52 +0000
committerpfg <pfg@FreeBSD.org>2013-01-26 21:50:52 +0000
commit440e8ae3c8d4ae8be087ea7161e68363563cc4b8 (patch)
tree50c4eb2a35adfaf41a7873016a8af5a934c467b0 /sys/fs
parentfc60ef94da43c5c4218e21f42aa2769c13b89e37 (diff)
downloadFreeBSD-src-440e8ae3c8d4ae8be087ea7161e68363563cc4b8.zip
FreeBSD-src-440e8ae3c8d4ae8be087ea7161e68363563cc4b8.tar.gz
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
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/ext2fs/ext2_inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/ext2fs/ext2_inode.c b/sys/fs/ext2fs/ext2_inode.c
index 82a3782..1195659 100644
--- a/sys/fs/ext2fs/ext2_inode.c
+++ b/sys/fs/ext2fs/ext2_inode.c
@@ -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);
OpenPOWER on IntegriCloud