Sparse reports a warning at wbc_attach_and_unlock_inode() warning: context imbalance in wbc_attach_and_unlock_inode() - unexpected unlock The root cause is the missing annotation at wbc_attach_and_unlock_inode() Add the missing __releases(&inode->i_lock) annotation Signed-off-by: Jules Irenge <jbi.octave@xxxxxxxxx> --- fs/fs-writeback.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 76ac9c7d32ec..008e572faf32 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -556,6 +556,7 @@ static void inode_switch_wbs(struct inode *inode, int new_wb_id) */ void wbc_attach_and_unlock_inode(struct writeback_control *wbc, struct inode *inode) + __releases(&inode->i_lock) { if (!inode_cgwb_enabled(inode)) { spin_unlock(&inode->i_lock); -- 2.24.1