Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284457
b: refs/heads/master
c: 1f5d78d
h: refs/heads/master
i:
  284455: 8328d9e
v: v3
  • Loading branch information
Artem Bityutskiy committed Jan 11, 2012
1 parent 9eab22f commit 304080f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 72f0d453d81d35087b1d3ad7c8285628c2be6e1d
refs/heads/master: 1f5d78dc4823a85f112aaa2d0f17624f8c2a6c52
12 changes: 5 additions & 7 deletions trunk/fs/ubifs/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down

0 comments on commit 304080f

Please sign in to comment.