The patch titled xfs: add lock annotations to xfs_trans_update_ail and xfs_trans_delete_ail has been removed from the -mm tree. Its filename is xfs-add-lock-annotations-to-xfs_trans_update_ail-and-xfs_trans_delete_ail.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ Subject: xfs: add lock annotations to xfs_trans_update_ail and xfs_trans_delete_ail From: Josh Triplett <josht@xxxxxxxxxx> xfs_trans_update_ail and xfs_trans_delete_ail get called with the AIL lock held, and release it. Add lock annotations to these two functions (abstracted like the AIL lock itself) so that sparse can check callers for lock pairing, and so that sparse will not complain about these functions since they intentionally use locks in this manner. Signed-off-by: Josh Triplett <josh@xxxxxxxxxxxxxxx> Cc: Nathan Scott <nathans@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/xfs/xfs_inode.c | 2 +- fs/xfs/xfs_mount.h | 3 ++- fs/xfs/xfs_trans_ail.c | 2 ++ fs/xfs/xfs_trans_priv.h | 12 +++++++----- 4 files changed, 12 insertions(+), 7 deletions(-) diff -puN fs/xfs/xfs_inode.c~xfs-add-lock-annotations-to-xfs_trans_update_ail-and-xfs_trans_delete_ail fs/xfs/xfs_inode.c --- a/fs/xfs/xfs_inode.c~xfs-add-lock-annotations-to-xfs_trans_update_ail-and-xfs_trans_delete_ail +++ a/fs/xfs/xfs_inode.c @@ -23,12 +23,12 @@ #include "xfs_inum.h" #include "xfs_imap.h" #include "xfs_trans.h" -#include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" +#include "xfs_trans_priv.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" diff -puN fs/xfs/xfs_mount.h~xfs-add-lock-annotations-to-xfs_trans_update_ail-and-xfs_trans_delete_ail fs/xfs/xfs_mount.h --- a/fs/xfs/xfs_mount.h~xfs-add-lock-annotations-to-xfs_trans_update_ail-and-xfs_trans_delete_ail +++ a/fs/xfs/xfs_mount.h @@ -74,7 +74,8 @@ extern struct bhv_vnodeops xfs_vnodeops; #define AIL_LOCK_DESTROY(x) spinlock_destroy(x) #define AIL_LOCK(mp,s) s=mutex_spinlock(&(mp)->m_ail_lock) #define AIL_UNLOCK(mp,s) mutex_spinunlock(&(mp)->m_ail_lock, s) - +#define ACQUIRES_AIL_LOCK(mp) __acquires((mp)->m_ail_lock) +#define RELEASES_AIL_LOCK(mp,s) __releases((mp)->m_ail_lock) /* * Prototypes and functions for the Data Migration subsystem. diff -puN fs/xfs/xfs_trans_ail.c~xfs-add-lock-annotations-to-xfs_trans_update_ail-and-xfs_trans_delete_ail fs/xfs/xfs_trans_ail.c --- a/fs/xfs/xfs_trans_ail.c~xfs-add-lock-annotations-to-xfs_trans_update_ail-and-xfs_trans_delete_ail +++ a/fs/xfs/xfs_trans_ail.c @@ -277,6 +277,7 @@ xfs_trans_update_ail( xfs_log_item_t *lip, xfs_lsn_t lsn, unsigned long s) + RELEASES_AIL_LOCK(mp, s) { xfs_ail_entry_t *ailp; xfs_log_item_t *dlip=NULL; @@ -329,6 +330,7 @@ xfs_trans_delete_ail( xfs_mount_t *mp, xfs_log_item_t *lip, unsigned long s) + RELEASES_AIL_LOCK(mp, s) { xfs_ail_entry_t *ailp; xfs_log_item_t *dlip; diff -puN fs/xfs/xfs_trans_priv.h~xfs-add-lock-annotations-to-xfs_trans_update_ail-and-xfs_trans_delete_ail fs/xfs/xfs_trans_priv.h --- a/fs/xfs/xfs_trans_priv.h~xfs-add-lock-annotations-to-xfs_trans_update_ail-and-xfs_trans_delete_ail +++ a/fs/xfs/xfs_trans_priv.h @@ -46,11 +46,13 @@ xfs_log_busy_slot_t *xfs_trans_add_busy /* * From xfs_trans_ail.c */ -void xfs_trans_update_ail(struct xfs_mount *, - struct xfs_log_item *, xfs_lsn_t, - unsigned long); -void xfs_trans_delete_ail(struct xfs_mount *, - struct xfs_log_item *, unsigned long); +void xfs_trans_update_ail(struct xfs_mount *mp, + struct xfs_log_item *lip, xfs_lsn_t lsn, + unsigned long s) + RELEASES_AIL_LOCK(mp, s); +void xfs_trans_delete_ail(struct xfs_mount *mp, + struct xfs_log_item *lip, unsigned long s) + RELEASES_AIL_LOCK(mp, s); struct xfs_log_item *xfs_trans_first_ail(struct xfs_mount *, int *); struct xfs_log_item *xfs_trans_next_ail(struct xfs_mount *, struct xfs_log_item *, int *, int *); _ Patches currently in -mm which might be from josht@xxxxxxxxxx are origin.patch efi-add-lock-annotations-for-efi_call_phys_prelog-and-efi_call_phys_epilog.patch mbcache-add-lock-annotation-for-__mb_cache_entry_release_unlock.patch afs-add-lock-annotations-to-afs_proc_cell_servers_startstop.patch fuse-add-lock-annotations-to-request_end-and-fuse_read_interrupt.patch hugetlbfs-add-lock-annotation-to-hugetlbfs_forget_inode.patch fs-add-lock-annotation-to-grab_super.patch rcu-add-lock-annotations-to-rcu_bh_torture_read_lockunlock.patch timer-add-lock-annotation-to-lock_timer_base.patch make-spinlock-rwlock-annotations-more-accurate-by-using.patch replace-_spin_trylock-with-spin_trylock-in-the-irq.patch pass-a-lock-expression-to-__cond_lock-like-__acquire-and.patch pass-sparse-the-lock-expression-given-to-lock-annotations.patch nfsd-add-lock-annotations-to-e_start-and-e_stop.patch srcu-3-rcu-variant-permitting-read-side-blocking-srcu-add-lock-annotations.patch rcu-add-module_author-to-rcutorture-module.patch rcu-fix-incorrect-description-of-default-for-rcutorture.patch rcu-mention-rcu_bh-in-description-of-rcutortures.patch rcu-avoid-kthread_stop-on-invalid-pointer-if-rcutorture.patch rcu-fix-sign-bug-making-rcu_random-always-return-the-same.patch rcu-add-fake-writers-to-rcutorture.patch rcu-add-fake-writers-to-rcutorture-tidy.patch rcu-refactor-srcu_torture_deferred_free-to-work-for.patch rcu-add-rcu_sync-torture-type-to-rcutorture.patch rcu-add-rcu_bh_sync-torture-type-to-rcutorture.patch rcu-add-sched-torture-type-to-rcutorture.patch rcu-credits-and-maintainers.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