提交 8ae2c0f6 编写于 作者: D David Chinner 提交者: Lachlan McIlroy

[XFS] Fix sparse warning in xlog_recover_do_efd_trans.

Sparse trips over the locking order in xlog_recover_do_efd_trans() when
xfs_trans_delete_ail() drops the ail lock. Because the unlock is
conditional, we need to either annotate with a "fake unlock" or change the
structure of the code so sparse thinks the function always unlocks.

Reordering the code makes it simpler, so do that.

SGI-PV: 972755
SGI-Modid: xfs-linux-melb:xfs-kern:30003a
Signed-off-by: NDavid Chinner <dgc@sgi.com>
Signed-off-by: NChristoph Hellwig <hch@infradead.org>
Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
上级 a8272ce0
...@@ -2733,21 +2733,13 @@ xlog_recover_do_efd_trans( ...@@ -2733,21 +2733,13 @@ xlog_recover_do_efd_trans(
* AIL lock. * AIL lock.
*/ */
xfs_trans_delete_ail(mp, lip); xfs_trans_delete_ail(mp, lip);
break; xfs_efi_item_free(efip);
return;
} }
} }
lip = xfs_trans_next_ail(mp, lip, &gen, NULL); lip = xfs_trans_next_ail(mp, lip, &gen, NULL);
} }
spin_unlock(&mp->m_ail_lock);
/*
* If we found it, then free it up. If it wasn't there, it
* must have been overwritten in the log. Oh well.
*/
if (lip != NULL) {
xfs_efi_item_free(efip);
} else {
spin_unlock(&mp->m_ail_lock);
}
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册