aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Chamberlain <mcgrof@kernel.org>2021-11-15 15:28:34 -0800
committerEryu Guan <guaneryu@gmail.com>2021-12-12 22:24:08 +0800
commitee78726548e0a0b808a340ef2e4097abea53952b (patch)
tree4121f1348ef9b02b1ba0aa60a17acc3ed8f345b0
parentd489644a5ad825e65da0812e8ea7da3a36a708f1 (diff)
downloadxfstests-dev-ee78726548e0a0b808a340ef2e4097abea53952b.tar.gz
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 <mcgrof@kernel.org> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-rw-r--r--common/module2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/module b/common/module
index ead0f881ac..6efab71d34 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