Whamcloud - gitweb
LU-8526 tests: ensure all OSTs active for allocations
[fs/lustre-release.git] / lustre / scripts / lustre_rmmod
index 8c07f78..76a9d11 100755 (executable)
@@ -11,20 +11,15 @@ LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
 LCTL=${LCTL:-"$LUSTRE/utils/lctl"}
 [ ! -f "$LCTL" ] && export LCTL=$(which lctl 2> /dev/null)
 
-RMMOD=rmmod
-if [ `uname -r | cut -c 3` -eq 4 ]; then
-    RMMOD="modprobe -r"
-fi
-
 unload_dep_module() {
-    # libcfs                107852  17 llite_lloop,lustre,obdfilter,ost,...
+    # libcfs                107852  17 lustre,obdfilter,ost,...
     local MODULE=$1
     local DEPS="$(lsmod | awk '($1 == "'$MODULE'") { print $4 }' | tr ',' ' ')"
     for SUBMOD in $DEPS; do
         unload_dep_module $SUBMOD
     done
     [ "$MODULE" = "libcfs" ] && $LCTL dk $TMP/debug >/dev/null || true
-    $RMMOD $MODULE 2>/dev/null || true
+    rmmod $MODULE 2>/dev/null || true
     return 0
 }