diff options
-rw-r--r-- | fs/ocfs2/namei.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 5ac4d52e090f..3e9b46002f22 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
@@ -2108,6 +2108,7 @@ int ocfs2_create_inode_in_orphan(struct inode *dir, | |||
2108 | } | 2108 | } |
2109 | did_quota_inode = 1; | 2109 | did_quota_inode = 1; |
2110 | 2110 | ||
2111 | inode->i_nlink = 0; | ||
2111 | /* do the real work now. */ | 2112 | /* do the real work now. */ |
2112 | status = ocfs2_mknod_locked(osb, dir, inode, | 2113 | status = ocfs2_mknod_locked(osb, dir, inode, |
2113 | 0, &new_di_bh, parent_di_bh, handle, | 2114 | 0, &new_di_bh, parent_di_bh, handle, |
@@ -2268,6 +2269,8 @@ int ocfs2_mv_orphaned_inode_to_new(struct inode *dir, | |||
2268 | di = (struct ocfs2_dinode *)di_bh->b_data; | 2269 | di = (struct ocfs2_dinode *)di_bh->b_data; |
2269 | le32_add_cpu(&di->i_flags, -OCFS2_ORPHANED_FL); | 2270 | le32_add_cpu(&di->i_flags, -OCFS2_ORPHANED_FL); |
2270 | di->i_orphaned_slot = 0; | 2271 | di->i_orphaned_slot = 0; |
2272 | inode->i_nlink = 1; | ||
2273 | ocfs2_set_links_count(di, inode->i_nlink); | ||
2271 | ocfs2_journal_dirty(handle, di_bh); | 2274 | ocfs2_journal_dirty(handle, di_bh); |
2272 | 2275 | ||
2273 | status = ocfs2_add_entry(handle, dentry, inode, | 2276 | status = ocfs2_add_entry(handle, dentry, inode, |