Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8ae2c0f64a81a93d2c394eacee29d6ced53b54f9 Commit: 8ae2c0f64a81a93d2c394eacee29d6ced53b54f9 Parent: a8272ce0c1d49aa3bec57682678f0bdfe28ed4ca Author: David Chinner <[EMAIL PROTECTED]> AuthorDate: Fri Nov 23 16:28:17 2007 +1100 Committer: Lachlan McIlroy <[EMAIL PROTECTED]> CommitDate: Thu Feb 7 18:15:29 2008 +1100
[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: David Chinner <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> Signed-off-by: Lachlan McIlroy <[EMAIL PROTECTED]> --- fs/xfs/xfs_log_recover.c | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 3b804b9..0716729 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -2733,21 +2733,13 @@ xlog_recover_do_efd_trans( * AIL lock. */ xfs_trans_delete_ail(mp, lip); - break; + xfs_efi_item_free(efip); + return; } } lip = xfs_trans_next_ail(mp, lip, &gen, NULL); } - - /* - * 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); - } + spin_unlock(&mp->m_ail_lock); } /* - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html