b=17309
i=johann
backport from bz 16266 for proper using write lock in lprocfs_remove().
return -ENODEV; \
} \
} while(0)
+#define LPROCFS_WRITE_ENTRY() do { \
+ down_write(&_lprocfs_lock); \
+} while(0)
+#define LPROCFS_WRITE_EXIT() do { \
+ up_write(&_lprocfs_lock); \
+} while(0)
/* You must use these macros when you want to refer to
* the import in a client obd_device for a lprocfs entry */
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)
if (temp == parent)
break;
}
- LPROCFS_EXIT();
+ LPROCFS_WRITE_EXIT();
}
struct proc_dir_entry *lprocfs_register(const char *name,
*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);
}