Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34268
b: refs/heads/master
c: 0f62de2
h: refs/heads/master
v: v3
  • Loading branch information
Tiger Yang authored and Mark Fasheh committed Sep 20, 2006
1 parent 0720a82 commit c79b320
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a663e30513d7ecc77dd71d474e7646bf78c0ba62
refs/heads/master: 0f62de2c9ca60a35f63122e7ea992cee8aae4bef
10 changes: 5 additions & 5 deletions trunk/fs/ocfs2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,11 +641,6 @@ static int ocfs2_link(struct dentry *old_dentry,
goto bail;
}

if (inode->i_nlink >= OCFS2_LINK_MAX) {
err = -EMLINK;
goto bail;
}

handle = ocfs2_alloc_handle(osb);
if (handle == NULL) {
err = -ENOMEM;
Expand All @@ -659,6 +654,11 @@ static int ocfs2_link(struct dentry *old_dentry,
goto bail;
}

if (!dir->i_nlink) {
err = -ENOENT;
goto bail;
}

err = ocfs2_check_dir_for_entry(dir, dentry->d_name.name,
dentry->d_name.len);
if (err)
Expand Down

0 comments on commit c79b320

Please sign in to comment.