diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index 4f35b2f315d4c8ee758ed91cf7479e672ad26c03..d269821203fda949f998c0310bad7c4afe12b32f 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c @@ -2272,7 +2272,7 @@ static int ext3_symlink (struct inode * dir, err = PTR_ERR(handle); goto err_drop_inode; } - inc_nlink(inode); + set_nlink(inode, 1); err = ext3_orphan_del(handle, inode); if (err) { ext3_journal_stop(handle); diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 86edc45b52a48d6025b61f17a28368f7ed94f5bb..2043f482375d000c517093f844ed2ce873802a0e 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -2315,7 +2315,7 @@ static int ext4_symlink(struct inode *dir, err = PTR_ERR(handle); goto err_drop_inode; } - inc_nlink(inode); + set_nlink(inode, 1); err = ext4_orphan_del(handle, inode); if (err) { ext4_journal_stop(handle);