Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34267
b: refs/heads/master
c: a663e30
h: refs/heads/master
i:
  34265: b9e07fe
  34263: 2f9a9c6
v: v3
  • Loading branch information
Mark Fasheh committed Sep 20, 2006
1 parent 969f31f commit 0720a82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 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: 471e3f57286da7ce8820ad42c77d5f5f49d56a41
refs/heads/master: a663e30513d7ecc77dd71d474e7646bf78c0ba62
12 changes: 5 additions & 7 deletions trunk/fs/ocfs2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,6 @@ static int ocfs2_mknod(struct inode *dir,
/* get our super block */
osb = OCFS2_SB(dir->i_sb);

if (S_ISDIR(mode) && (dir->i_nlink >= OCFS2_LINK_MAX)) {
mlog(ML_ERROR, "inode %llu has i_nlink of %u\n",
(unsigned long long)OCFS2_I(dir)->ip_blkno, dir->i_nlink);
status = -EMLINK;
goto leave;
}

handle = ocfs2_alloc_handle(osb);
if (handle == NULL) {
status = -ENOMEM;
Expand All @@ -331,6 +324,11 @@ static int ocfs2_mknod(struct inode *dir,
goto leave;
}

if (S_ISDIR(mode) && (dir->i_nlink >= OCFS2_LINK_MAX)) {
status = -EMLINK;
goto leave;
}

dirfe = (struct ocfs2_dinode *) parent_fe_bh->b_data;
if (!dirfe->i_links_count) {
/* can't make a file in a deleted directory. */
Expand Down

0 comments on commit 0720a82

Please sign in to comment.