Skip to contentSkip to conversation

fs: ocfs: remove unnecessary assertion in dlm_migrate_lockres

PATCH Applied Aditya Pakki 1 participant 1 message Dec 18, 2019 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: ocfs: remove unnecessary assertion in dlm_migrate_lockres

In the only caller of dlm_migrate_lockres() - dlm_empty_lockres(), target is checked for O2NM_MAX_NODES. Thus, the assertion in dlm_migrate_lockres() is unnecessary and can be removed. The patch eliminates such a check.

---
 fs/ocfs2/dlm/dlmmaster.c | 2 --
 1 file changed, 2 deletions(-)
fs/ocfs2/dlm/dlmmaster.c +0 -2
index 74b768ca1cd8..3b239637f884 100644
@@ -2554,8 +2554,6 @@ static int dlm_migrate_lockres(struct dlm_ctxt *dlm,
 	if (!dlm_grab(dlm))
 		return -EINVAL;
 
-	BUG_ON(target == O2NM_MAX_NODES);
-
 	name = res->lockname.name;
 	namelen = res->lockname.len;
 
Signature · 1 line
2.20.1