aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/bmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/bmap.c')
-rw-r--r--fs/gfs2/bmap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 692d4a3da1bc..06e3447ea132 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -163,6 +163,7 @@ int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page)
163 if (ip->i_di.di_size) { 163 if (ip->i_di.di_size) {
164 *(__be64 *)(di + 1) = cpu_to_be64(block); 164 *(__be64 *)(di + 1) = cpu_to_be64(block);
165 ip->i_di.di_blocks++; 165 ip->i_di.di_blocks++;
166 gfs2_set_inode_blocks(&ip->i_inode);
166 di->di_blocks = cpu_to_be64(ip->i_di.di_blocks); 167 di->di_blocks = cpu_to_be64(ip->i_di.di_blocks);
167 } 168 }
168 169
@@ -272,6 +273,7 @@ static int build_height(struct inode *inode, unsigned height)
272 *(__be64 *)(di + 1) = cpu_to_be64(bn); 273 *(__be64 *)(di + 1) = cpu_to_be64(bn);
273 ip->i_di.di_height += new_height; 274 ip->i_di.di_height += new_height;
274 ip->i_di.di_blocks += new_height; 275 ip->i_di.di_blocks += new_height;
276 gfs2_set_inode_blocks(&ip->i_inode);
275 di->di_height = cpu_to_be16(ip->i_di.di_height); 277 di->di_height = cpu_to_be16(ip->i_di.di_height);
276 di->di_blocks = cpu_to_be64(ip->i_di.di_blocks); 278 di->di_blocks = cpu_to_be64(ip->i_di.di_blocks);
277 brelse(dibh); 279 brelse(dibh);
@@ -415,6 +417,7 @@ static int lookup_block(struct gfs2_inode *ip, struct buffer_head *bh,
415 417
416 *ptr = cpu_to_be64(*block); 418 *ptr = cpu_to_be64(*block);
417 ip->i_di.di_blocks++; 419 ip->i_di.di_blocks++;
420 gfs2_set_inode_blocks(&ip->i_inode);
418 421
419 *new = 1; 422 *new = 1;
420 return 0; 423 return 0;
@@ -770,6 +773,7 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh,
770 if (!ip->i_di.di_blocks) 773 if (!ip->i_di.di_blocks)
771 gfs2_consist_inode(ip); 774 gfs2_consist_inode(ip);
772 ip->i_di.di_blocks--; 775 ip->i_di.di_blocks--;
776 gfs2_set_inode_blocks(&ip->i_inode);
773 } 777 }
774 if (bstart) { 778 if (bstart) {
775 if (metadata) 779 if (metadata)