ocfs2: use OCFS2_INODE_SKIP_ORPHAN_DIR in ocfs2_symlink error path

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>
This commit is contained in:
Li Dongyang 2010-04-22 16:11:25 +08:00 committed by Mark Fasheh
parent d4cd1871cf
commit ab41fdc8fd

View File

@ -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);
}