From 27d1f3bcf7bd7ac0daa308bab64d27af6c52fb40 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 5 Jun 2018 11:33:24 -0700 Subject: [PATCH] scoutfs: inode read shouldn't modify online blocks There was a typo in the addition of i_blocks tracking that would set online blocks to the value of offline blocks when reading an existing inode into memory. Signed-off-by: Zach Brown --- kmod/src/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod/src/inode.c b/kmod/src/inode.c index 2ae48bb5..b873e33f 100644 --- a/kmod/src/inode.c +++ b/kmod/src/inode.c @@ -241,7 +241,7 @@ static void load_inode(struct inode *inode, struct scoutfs_inode *cinode) * i_blocks is initialized from online and offline and is then * maintained as blocks come and go. */ - inode->i_blocks = (ci->online_blocks = + ci->offline_blocks) + inode->i_blocks = (ci->online_blocks + ci->offline_blocks) << SCOUTFS_BLOCK_SECTOR_SHIFT; set_item_info(ci, cinode);