From: Luis Chamberlain Date: Mon, 15 Nov 2021 23:28:34 +0000 (-0800) Subject: common/module: fix patient module remover when module is not present X-Git-Tag: v2022.05.01~152 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ee78726548e0a0b808a340ef2e4097abea53952b;p=xfstests-dev.git common/module: fix patient module remover when module is not present When module is not present and the open coded patient module remover is called we'll end up in a loop which never ends. Fix this. I actually found this issue not in fstests, but when applying this open coded solution to blktests. In fstest we tend to only call module remove when we have a module loaded. blktests is different, and so I immediately spotted the issue there. Signed-off-by: Luis Chamberlain Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/common/module b/common/module index ead0f881..6efab71d 100644 --- a/common/module +++ b/common/module @@ -180,6 +180,8 @@ _patient_rmmod() continue fi let max_tries=$max_tries-1 + else + break fi done