Skip to contentSkip to conversation

ocfs2: use OCFS2_INODE_SKIP_ORPHAN_DIR in ocfs2_symlink error path

PATCH New Li Dongyang 2 participants 2 messages Apr 22, 2010 – Apr 23, 2010 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 ocfs2: use OCFS2_INODE_SKIP_ORPHAN_DIR in ocfs2_symlink error path

mark the inode with flag OCFS2_INODE_SKIP_ORPHAN_DIR when we meet an error after allocating one, so that we can kill the inode.

---
 fs/ocfs2/namei.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/ocfs2/namei.c +1 -0
index b2a8ed5..4ce4416 100644
@@ -1809,6 +1809,7 @@ bail:
 	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);
 	}
Signature · 1 line
1.6.4.2