Skip to contentSkip to conversation

ocfs2-add-missing-annotations-for-ocfs2_refcount_cache_lock-and-ocfs2_refcount_cache_unlock.patch removed from -mm tree

merged [email protected] 1 participant 1 message Apr 3, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: ocfs2: add missing annotations for ocfs2_refcount_cache_lock() and ocfs2_refcount_cache_unlock()
has been removed from the -mm tree. Its filename was
ocfs2-add-missing-annotations-for-ocfs2_refcount_cache_lock-and-ocfs2_refcount_cache_unlock.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Jules Irenge <[email protected]>
Subject: ocfs2: add missing annotations for ocfs2_refcount_cache_lock() and ocfs2_refcount_cache_unlock()

Sparse reports warnings at ocfs2_refcount_cache_lock()
and ocfs2_refcount_cache_unlock()

warning: context imbalance in ocfs2_refcount_cache_lock()
- wrong count at exit
warning: context imbalance in ocfs2_refcount_cache_unlock()
- unexpected unlock

The root cause is the missing annotation at ocfs2_refcount_cache_lock() and at ocfs2_refcount_cache_unlock()

Add the missing __acquires(&rf->rf_lock) annotation to ocfs2_refcount_cache_lock()

Add the missing __releases(&rf->rf_lock) annotation to ocfs2_refcount_cache_unlock()

---

 fs/ocfs2/refcounttree.c |    2 ++
 1 file changed, 2 insertions(+)
fs/ocfs2/refcounttree.c renamed from fs/ocfs2/refcounttree.c~ocfs2-add-missing-annotations-for-ocfs2_refcount_cache_lock-and-ocfs2_refcount_cache_unlock +2 -0
@@ -154,6 +154,7 @@ ocfs2_refcount_cache_get_super(struct oc
 }
 
 static void ocfs2_refcount_cache_lock(struct ocfs2_caching_info *ci)
+__acquires(&rf->rf_lock)
 {
 	struct ocfs2_refcount_tree *rf = cache_info_to_refcount(ci);
 
@@ -161,6 +162,7 @@ static void ocfs2_refcount_cache_lock(st
 }
 
 static void ocfs2_refcount_cache_unlock(struct ocfs2_caching_info *ci)
+__releases(&rf->rf_lock)
 {
 	struct ocfs2_refcount_tree *rf = cache_info_to_refcount(ci);
 

_

Patches currently in -mm which might be from [email protected] are

mm-compaction-add-missing-annotation-for-compact_lock_irqsave.patch mm-hugetlb-add-missing-annotation-for-gather_surplus_pages.patch mm-mempolicy-add-missing-annotation-for-queue_pages_pmd.patch mm-slub-add-missing-annotation-for-get_map.patch mm-slub-add-missing-annotation-for-put_map.patch mm-zsmalloc-add-missing-annotation-for-migrate_read_lock.patch mm-zsmalloc-add-missing-annotation-for-migrate_read_unlock.patch mm-zsmalloc-add-missing-annotation-for-pin_tag.patch mm-zsmalloc-add-missing-annotation-for-unpin_tag.patch proc-annotate-close_pdeo-for-sparse.patch