diff options
-rw-r--r-- | fs/gfs2/inode.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 017960cf1d7a..a7d611b93f0f 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -599,9 +599,7 @@ static int link_dinode(struct gfs2_inode *dip, const struct qstr *name, | |||
599 | error = gfs2_meta_inode_buffer(ip, &dibh); | 599 | error = gfs2_meta_inode_buffer(ip, &dibh); |
600 | if (error) | 600 | if (error) |
601 | goto fail_end_trans; | 601 | goto fail_end_trans; |
602 | inc_nlink(&ip->i_inode); | 602 | set_nlink(&ip->i_inode, S_ISDIR(ip->i_inode.i_mode) ? 2 : 1); |
603 | if (S_ISDIR(ip->i_inode.i_mode)) | ||
604 | inc_nlink(&ip->i_inode); | ||
605 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 603 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
606 | gfs2_dinode_out(ip, dibh->b_data); | 604 | gfs2_dinode_out(ip, dibh->b_data); |
607 | brelse(dibh); | 605 | brelse(dibh); |