From 3df2991804bde3c470a221972bb0e22165f275d8 Mon Sep 17 00:00:00 2001
From: bwzhou <bwzhou>
Date: Thu, 27 Sep 2007 03:15:17 +0000
Subject: [PATCH] Branch b1_6 b=12840 i=green i=johann

prevent self-evicting through procfs
---
 lustre/obdclass/genops.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c
index 81765de1a1..89a7b5c2af 100644
--- a/lustre/obdclass/genops.c
+++ b/lustre/obdclass/genops.c
@@ -1243,6 +1243,10 @@ int obd_export_evict_by_uuid(struct obd_device *obd, char *uuid)
         int exports_evicted = 0;
 
         obd_str2uuid(&doomed, uuid);
+        if(obd_uuid_equals(&doomed, &obd->obd_uuid)) {
+                CERROR("%s: can't evict myself\n", obd->obd_name);
+                return exports_evicted;
+        }
 
         doomed_exp = lustre_hash_get_object_by_key(obd->obd_uuid_hash_body, 
                                                    &doomed);
-- 
GitLab