aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/reiserfs/prints.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c
index b87b23717c23..de71372f0dfe 100644
--- a/fs/reiserfs/prints.c
+++ b/fs/reiserfs/prints.c
@@ -184,7 +184,7 @@ static char *is_there_reiserfs_struct(char *fmt, int *what)
184 printk ("bad key %lu %lu %lu %lu", key->k_dir_id, key->k_objectid, 184 printk ("bad key %lu %lu %lu %lu", key->k_dir_id, key->k_objectid,
185 key->k_offset, key->k_uniqueness); 185 key->k_offset, key->k_uniqueness);
186*/ 186*/
187 187static DEFINE_SPINLOCK(error_lock);
188static void prepare_error_buf(const char *fmt, va_list args) 188static void prepare_error_buf(const char *fmt, va_list args)
189{ 189{
190 char *fmt1 = fmt_buf; 190 char *fmt1 = fmt_buf;
@@ -192,6 +192,8 @@ static void prepare_error_buf(const char *fmt, va_list args)
192 char *p = error_buf; 192 char *p = error_buf;
193 int what; 193 int what;
194 194
195 spin_lock(&error_lock);
196
195 strcpy(fmt1, fmt); 197 strcpy(fmt1, fmt);
196 198
197 while ((k = is_there_reiserfs_struct(fmt1, &what)) != NULL) { 199 while ((k = is_there_reiserfs_struct(fmt1, &what)) != NULL) {
@@ -237,6 +239,7 @@ static void prepare_error_buf(const char *fmt, va_list args)
237 fmt1 = k + 2; 239 fmt1 = k + 2;
238 } 240 }
239 vsprintf(p, fmt1, args); 241 vsprintf(p, fmt1, args);
242 spin_unlock(&error_lock);
240 243
241} 244}
242 245