Skip to content

Commit

Permalink
ocfs2: use OCFS2_INODE_SKIP_ORPHAN_DIR in ocfs2_symlink error path
Browse files Browse the repository at this point in the history
Mark the inode with flag OCFS2_INODE_SKIP_ORPHAN_DIR when we get an error
after allocating one, so that we can kill the inode.

Signed-off-by: Li Dongyang <lidongyang@novell.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
  • Loading branch information
Li Dongyang authored and Mark Fasheh committed Apr 23, 2010
1 parent d4cd187 commit ab41fdc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/ocfs2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,7 @@ static int ocfs2_symlink(struct inode *dir,
if (xattr_ac)
ocfs2_free_alloc_context(xattr_ac);
if ((status < 0) && inode) {
OCFS2_I(inode)->ip_flags |= OCFS2_INODE_SKIP_ORPHAN_DIR;
clear_nlink(inode);
iput(inode);
}
Expand Down

0 comments on commit ab41fdc

Please sign in to comment.