diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-12-17 20:27:36 +0300 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-12-22 10:02:01 +0300 |
commit | efc557570dc99b46e46a7be51c3c7402b485e829 (patch) | |
tree | faba8c63e6bcf798ab76f7da1fcb035ece445700 /fs/xfs/support/debug.h | |
parent | 9f6c92b9cc2fd41d6c7b493be5637cc5b5659880 (diff) | |
download | linux-efc557570dc99b46e46a7be51c3c7402b485e829.tar.xz |
[XFS] avoid memory allocations in xfs_fs_vcmn_err
xfs_fs_vcmn_err can be called under a spinlock, but does a sleeping memory
allocation to create buffer for it's internal sprintf. Fortunately it's
the only caller of icmn_err, so we can merge the two and have one single
static buffer and spinlock protecting it. While we're at it make sure
we proper __attribute__ format annotations so that the compiler can detect
mismatched format strings.
Reported-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/support/debug.h')
-rw-r--r-- | fs/xfs/support/debug.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/xfs/support/debug.h b/fs/xfs/support/debug.h index 75845f950814..6f4fd37c67af 100644 --- a/fs/xfs/support/debug.h +++ b/fs/xfs/support/debug.h @@ -27,8 +27,6 @@ #define CE_ALERT 1 /* alert */ #define CE_PANIC 0 /* panic */ -extern void icmn_err(int, char *, va_list) - __attribute__ ((format (printf, 2, 0))); extern void cmn_err(int, char *, ...) __attribute__ ((format (printf, 2, 3))); extern void assfail(char *expr, char *f, int l); |