diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c
index 5a50482eb48210ad3ea2fcb93372bb056bf07d37..54a69e6ee43d9997d76a0bda5cca368db2d9a22f 100644
--- a/lustre/mds/handler.c
+++ b/lustre/mds/handler.c
@@ -321,6 +321,9 @@ static int mds_destroy_export(struct obd_export *export)
         med = &export->exp_mds_data;
         target_destroy_export(export);
 
+        if (obd_uuid_equals(&export->exp_client_uuid, &obd->obd_uuid))
+                GOTO(out, 0);
+
         push_ctxt(&saved, &obd->obd_ctxt, NULL);
         /* Close any open files (which may also cause orphan unlinking). */
         spin_lock(&med->med_open_lock);
@@ -350,6 +353,7 @@ static int mds_destroy_export(struct obd_export *export)
         spin_unlock(&med->med_open_lock);
         pop_ctxt(&saved, &obd->obd_ctxt, NULL);
 
+out:
         mds_client_free(export, !(export->exp_flags & OBD_OPT_FAILOVER));
 
         RETURN(rc);
diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh
index beaa4b61c1d26b8545a7d1d5021ada14b1615579..f2483c385145c620c148e55eb47d7653a3a126aa 100644
--- a/lustre/tests/conf-sanity.sh
+++ b/lustre/tests/conf-sanity.sh
@@ -646,4 +646,29 @@ test_16() {
 }
 run_test 16 "verify that lustre will correct the mode of OBJECTS/LOGS/PENDING"
 
+test_17() {
+        TMPMTPT="/mnt/conf17"
+
+        if [ ! -f "$MDSDEV" ]; then
+            echo "no $MDSDEV existing, so mount Lustre to create one"
+            start_ost
+            start_mds
+            mount_client $MOUNT
+            check_mount || return 41
+            cleanup || return $?
+        fi
+
+        echo "Remove mds config log"
+        [ -d $TMPMTPT ] || mkdir -p $TMPMTPT
+        mount -o loop -t ext3 $MDSDEV $TMPMTPT || return $?
+        rm -f $TMPMTPT/LOGS/mds_svc || return $?
+        umount $TMPMTPT || return $?
+
+        start_ost
+	start mds $MDSLCONFARGS && return 42
+        cleanup || return $?
+}
+run_test 17 "Verify failed mds_postsetup won't fail assertion (2936)"
+
+
 equals_msg "Done"