Whamcloud - gitweb
Branch b1_8_gate
authorbobijam <bobijam>
Fri, 10 Oct 2008 01:50:40 +0000 (01:50 +0000)
committerbobijam <bobijam>
Fri, 10 Oct 2008 01:50:40 +0000 (01:50 +0000)
b=17309
i=johann

backport from bz 16266 for proper using write lock in lprocfs_remove().

lustre/obdclass/lprocfs_status.c

index 594228d..1e38128 100644 (file)
@@ -335,7 +335,7 @@ void lprocfs_remove(struct proc_dir_entry **rooth)
 
         parent = root->parent;
         LASSERT(parent != NULL);
-        LPROCFS_ENTRY(); /* search vs remove race */
+        LPROCFS_WRITE_ENTRY(); /* search vs remove race */
 
         while (1) {
                 while (temp->subdir != NULL)
@@ -357,7 +357,7 @@ void lprocfs_remove(struct proc_dir_entry **rooth)
                 if (temp == parent)
                         break;
         }
-        LPROCFS_EXIT();
+        LPROCFS_WRITE_EXIT();
 }
 
 struct proc_dir_entry *lprocfs_register(const char *name,
@@ -1332,7 +1332,7 @@ void lprocfs_exp_print_hash(void *obj, void *cb_data)
                         *data->len += lustre_hash_debug_header(data->page,
                                                                data->count);
 
-                *data->len += lustre_hash_debug_str(lh, data->page + 
+                *data->len += lustre_hash_debug_str(lh, data->page +
                                                     *data->len,
                                                     data->count);
      }