[PATCH 1/2] fs_pin: Add missing annotation to pin_kill() declaration

Jules Irenge
2020-01-30T00:29:30Z

Sparse reports several warnings within the kernel acct.c file

warning: context imbalance in acct_on()
- different lock contexts for basic block
warning: context imbalance in __se_sys_acct()
- different lock contexts for basic block
warning: context imbalance in acct_exit_ns()
- wrong count at exit

The root cause is a missing annotation at
declaration of pin_kill() within the header file
Given that pin_kill() does actually call
read_rcu_unlock()in its function definition

Add the missing __releases(RCU) annotation.

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
include/linux/fs_pin.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/fs_pin.h b/include/linux/fs_pin.h
index bdd09fd2520c..d2fcf1a5112f 100644
--- a/include/linux/fs_pin.h
+++ b/include/linux/fs_pin.h
@@ -21,4 +21,4 @@ static inline void init_fs_pin(struct fs_pin *p, void (*kill)(struct fs_pin *))

void pin_remove(struct fs_pin *);
void pin_insert(struct fs_pin *, struct vfsmount *);
-void pin_kill(struct fs_pin *);
+void pin_kill(struct fs_pin *) __releases(RCU);
--
2.24.1