diff options
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r-- | fs/gfs2/inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 6499c4f91078..f4c48395208a 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -325,6 +325,7 @@ int gfs2_change_nlink(struct gfs2_inode *ip, int diff) | |||
325 | uint32_t nlink; | 325 | uint32_t nlink; |
326 | int error; | 326 | int error; |
327 | 327 | ||
328 | BUG_ON(ip->i_di.di_nlink != ip->i_inode.i_nlink); | ||
328 | nlink = ip->i_di.di_nlink + diff; | 329 | nlink = ip->i_di.di_nlink + diff; |
329 | 330 | ||
330 | /* If we are reducing the nlink count, but the new value ends up being | 331 | /* If we are reducing the nlink count, but the new value ends up being |
@@ -341,6 +342,7 @@ int gfs2_change_nlink(struct gfs2_inode *ip, int diff) | |||
341 | 342 | ||
342 | ip->i_di.di_nlink = nlink; | 343 | ip->i_di.di_nlink = nlink; |
343 | ip->i_di.di_ctime = get_seconds(); | 344 | ip->i_di.di_ctime = get_seconds(); |
345 | ip->i_inode.i_nlink = nlink; | ||
344 | 346 | ||
345 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 347 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
346 | gfs2_dinode_out(&ip->i_di, dibh->b_data); | 348 | gfs2_dinode_out(&ip->i_di, dibh->b_data); |