From 304080f1bc8dc07fd6f246d65b46cd0305e4d5d5 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Wed, 11 Jan 2012 15:13:27 +0200 Subject: [PATCH] --- yaml --- r: 284457 b: refs/heads/master c: 1f5d78dc4823a85f112aaa2d0f17624f8c2a6c52 h: refs/heads/master i: 284455: 8328d9e4627386e47e1c390972450c8812c36f53 v: v3 --- [refs] | 2 +- trunk/fs/ubifs/debug.h | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 445bce64f497..b243c9702527 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 72f0d453d81d35087b1d3ad7c8285628c2be6e1d +refs/heads/master: 1f5d78dc4823a85f112aaa2d0f17624f8c2a6c52 diff --git a/trunk/fs/ubifs/debug.h b/trunk/fs/ubifs/debug.h index 8d9c46810189..164fd48c583a 100644 --- a/trunk/fs/ubifs/debug.h +++ b/trunk/fs/ubifs/debug.h @@ -175,19 +175,17 @@ const char *dbg_key_str1(const struct ubifs_info *c, const union ubifs_key *key); /* - * DBGKEY macros require @dbg_lock to be held, which it is in the dbg message - * macros. + * TODO: these macros are now broken because there is no locking around them + * and we use a global buffer for the key string. This means that in case of + * concurrent execution we will end up with incorrect and messy key strings. */ #define DBGKEY(key) dbg_key_str0(c, (key)) #define DBGKEY1(key) dbg_key_str1(c, (key)) extern spinlock_t dbg_lock; -#define ubifs_dbg_msg(type, fmt, ...) do { \ - spin_lock(&dbg_lock); \ - pr_debug("UBIFS DBG " type ": " fmt "\n", ##__VA_ARGS__); \ - spin_unlock(&dbg_lock); \ -} while (0) +#define ubifs_dbg_msg(type, fmt, ...) \ + pr_debug("UBIFS DBG " type ": " fmt "\n", ##__VA_ARGS__) /* Just a debugging messages not related to any specific UBIFS subsystem */ #define dbg_msg(fmt, ...) ubifs_dbg_msg("msg", fmt, ##__VA_ARGS__)