Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190556
b: refs/heads/master
c: 062d340
h: refs/heads/master
v: v3
  • Loading branch information
Li Dongyang authored and Mark Fasheh committed Apr 23, 2010
1 parent 605748f commit eefb8e0
Show file tree
Hide file tree
Showing 2 changed files with 12 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: ab41fdc8fdd9f0942430941c1e2b516fd481371d
refs/heads/master: 062d340384dcf77dfd8de0a082b5da571de3925a
16 changes: 11 additions & 5 deletions trunk/fs/ocfs2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,6 @@ static int ocfs2_mknod(struct inode *dir,

ocfs2_free_dir_lookup_result(&lookup);

if ((status < 0) && inode) {
clear_nlink(inode);
iput(inode);
}

if (inode_ac)
ocfs2_free_alloc_context(inode_ac);

Expand All @@ -459,6 +454,17 @@ static int ocfs2_mknod(struct inode *dir,
if (meta_ac)
ocfs2_free_alloc_context(meta_ac);

/*
* We should call iput after the i_mutex of the bitmap been
* unlocked in ocfs2_free_alloc_context, or the
* ocfs2_delete_inode will mutex_lock again.
*/
if ((status < 0) && inode) {
OCFS2_I(inode)->ip_flags |= OCFS2_INODE_SKIP_ORPHAN_DIR;
clear_nlink(inode);
iput(inode);
}

mlog_exit(status);

return status;
Expand Down

0 comments on commit eefb8e0

Please sign in to comment.