diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2021-11-15 15:28:34 -0800 |
---|---|---|
committer | Eryu Guan <guaneryu@gmail.com> | 2021-12-12 22:24:08 +0800 |
commit | ee78726548e0a0b808a340ef2e4097abea53952b (patch) | |
tree | 4121f1348ef9b02b1ba0aa60a17acc3ed8f345b0 | |
parent | d489644a5ad825e65da0812e8ea7da3a36a708f1 (diff) | |
download | xfstests-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/module | 2 |
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 |