quota: Use %pV and __attribute__((format (printf in __quota_error and fix fallout

Use %pV in __quota_error so a single printk can not be
interleaved with other logging messages.
Add __attribute__((format (printf, 3, 4))) so format
and arguments can be verified by compiler.
Make sure printk formats and arguments match.

Block # needed a pointer dereference.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
Joe Perches 2010-11-23 18:49:54 -08:00 committed by Jan Kara
parent 9c52749232
commit 055adcbd7d
3 changed files with 19 additions and 13 deletions

View file

@ -31,8 +31,9 @@ static inline bool is_quota_modification(struct inode *inode, struct iattr *ia)
#define quota_error(sb, fmt, args...) \
__quota_error((sb), __func__, fmt , ## args)
extern void __quota_error(struct super_block *sb, const char *func,
const char *fmt, ...);
extern __attribute__((format (printf, 3, 4)))
void __quota_error(struct super_block *sb, const char *func,
const char *fmt, ...);
/*
* declaration of quota_function calls in kernel.