The patch titled Subject: ocfs2: access orphan dinode before delete entry in ocfs2_orphan_del has been removed from the -mm tree. Its filename was ocfs2-access-orphan-dinode-before-delete-entry-in-ocfs2_orphan_del.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Joseph Qi <joseph.qi@xxxxxxxxxx> Subject: ocfs2: access orphan dinode before delete entry in ocfs2_orphan_del In ocfs2_orphan_del, currently it finds and deletes entry first, and then access orphan dir dinode. This will have a problem once ocfs2_journal_access_di fails. In this case, entry will be removed from orphan dir, but in deed the inode hasn't been deleted successfully. In other words, the file is missing but not actually deleted. So we should access orphan dinode first like unlink and rename. Signed-off-by: Joseph Qi <joseph.qi@xxxxxxxxxx> Reviewed-by: Jiufei Xue <xuejiufei@xxxxxxxxxx> Cc: Mark Fasheh <mfasheh@xxxxxxx> Cc: Joel Becker <jlbec@xxxxxxxxxxxx> Reviewed-by: Junxiao Bi <junxiao.bi@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ocfs2/namei.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff -puN fs/ocfs2/namei.c~ocfs2-access-orphan-dinode-before-delete-entry-in-ocfs2_orphan_del fs/ocfs2/namei.c --- a/fs/ocfs2/namei.c~ocfs2-access-orphan-dinode-before-delete-entry-in-ocfs2_orphan_del +++ a/fs/ocfs2/namei.c @@ -2372,6 +2372,15 @@ int ocfs2_orphan_del(struct ocfs2_super (unsigned long long)OCFS2_I(orphan_dir_inode)->ip_blkno, name, strlen(name)); + status = ocfs2_journal_access_di(handle, + INODE_CACHE(orphan_dir_inode), + orphan_dir_bh, + OCFS2_JOURNAL_ACCESS_WRITE); + if (status < 0) { + mlog_errno(status); + goto leave; + } + /* find it's spot in the orphan directory */ status = ocfs2_find_entry(name, strlen(name), orphan_dir_inode, &lookup); @@ -2385,15 +2394,6 @@ int ocfs2_orphan_del(struct ocfs2_super if (status < 0) { mlog_errno(status); goto leave; - } - - status = ocfs2_journal_access_di(handle, - INODE_CACHE(orphan_dir_inode), - orphan_dir_bh, - OCFS2_JOURNAL_ACCESS_WRITE); - if (status < 0) { - mlog_errno(status); - goto leave; } /* do the i_nlink dance! :) */ _ Patches currently in -mm which might be from joseph.qi@xxxxxxxxxx are ocfs2-dlm-fix-race-between-convert-and-recovery.patch ocfs2-dlm-fix-race-between-convert-and-recovery-v2.patch ocfs2-dlm-fix-race-between-convert-and-recovery-v3.patch ocfs2-dlm-fix-bug-in-dlm_move_lockres_to_recovery_list.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html