Merge branch 'i2c/for-mergewindow' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / fs / gfs2 / lock_dlm.c
index dac0401..50578f8 100644 (file)
@@ -299,6 +299,11 @@ static void gdlm_put_lock(struct gfs2_glock *gl)
        gfs2_sbstats_inc(gl, GFS2_LKS_DCOUNT);
        gfs2_update_request_times(gl);
 
+       /* don't want to call dlm if we've unmounted the lock protocol */
+       if (test_bit(DFL_UNMOUNT, &ls->ls_recover_flags)) {
+               gfs2_glock_free(gl);
+               return;
+       }
        /* don't want to skip dlm_unlock writing the lvb when lock has one */
 
        if (test_bit(SDF_SKIP_DLM_UNLOCK, &sdp->sd_flags) &&