Skip to content

Commit 8f745e6

Browse files
irengetorvalds
authored andcommitted
ocfs2: add missing annotation for dlm_empty_lockres()
Sparse reports a warning at dlm_empty_lockres() warning: context imbalance in dlm_purge_lockres() - unexpected unlock The root cause is the missing annotation at dlm_purge_lockres() Add the missing __must_hold(&dlm->spinlock) Signed-off-by: Jules Irenge <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Cc: Junxiao Bi <[email protected]> Cc: Joseph Qi <[email protected]> Cc: Changwei Ge <[email protected]> Cc: Gang He <[email protected]> Cc: Jun Piao <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 93e72b3 commit 8f745e6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/ocfs2/dlm/dlmmaster.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2760,6 +2760,7 @@ static int dlm_migrate_lockres(struct dlm_ctxt *dlm,
27602760
* Returns: 1 if dlm->spinlock was dropped/retaken, 0 if never dropped
27612761
*/
27622762
int dlm_empty_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)
2763+
__must_hold(&dlm->spinlock)
27632764
{
27642765
int ret;
27652766
int lock_dropped = 0;

0 commit comments

Comments
 (0)