aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nilfs2/namei.c')
-rw-r--r--fs/nilfs2/namei.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c
index 1cd3f624dffc..fce2bbee66d4 100644
--- a/fs/nilfs2/namei.c
+++ b/fs/nilfs2/namei.c
@@ -193,9 +193,6 @@ static int nilfs_link(struct dentry *old_dentry, struct inode *dir,
193 struct nilfs_transaction_info ti; 193 struct nilfs_transaction_info ti;
194 int err; 194 int err;
195 195
196 if (inode->i_nlink >= NILFS_LINK_MAX)
197 return -EMLINK;
198
199 err = nilfs_transaction_begin(dir->i_sb, &ti, 1); 196 err = nilfs_transaction_begin(dir->i_sb, &ti, 1);
200 if (err) 197 if (err)
201 return err; 198 return err;
@@ -219,9 +216,6 @@ static int nilfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
219 struct nilfs_transaction_info ti; 216 struct nilfs_transaction_info ti;
220 int err; 217 int err;
221 218
222 if (dir->i_nlink >= NILFS_LINK_MAX)
223 return -EMLINK;
224
225 err = nilfs_transaction_begin(dir->i_sb, &ti, 1); 219 err = nilfs_transaction_begin(dir->i_sb, &ti, 1);
226 if (err) 220 if (err)
227 return err; 221 return err;
@@ -400,11 +394,6 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry,
400 drop_nlink(new_inode); 394 drop_nlink(new_inode);
401 nilfs_mark_inode_dirty(new_inode); 395 nilfs_mark_inode_dirty(new_inode);
402 } else { 396 } else {
403 if (dir_de) {
404 err = -EMLINK;
405 if (new_dir->i_nlink >= NILFS_LINK_MAX)
406 goto out_dir;
407 }
408 err = nilfs_add_link(new_dentry, old_inode); 397 err = nilfs_add_link(new_dentry, old_inode);
409 if (err) 398 if (err)
410 goto out_dir; 399 goto out_dir;