diff options
-rw-r--r-- | fs/quota/dquot.c | 18 | ||||
-rw-r--r-- | fs/quota/quota_tree.c | 9 | ||||
-rw-r--r-- | include/linux/quotaops.h | 5 |
3 files changed, 19 insertions, 13 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 0fed41e6efcd..84becd3e4772 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c | |||
@@ -133,16 +133,20 @@ __cacheline_aligned_in_smp DEFINE_SPINLOCK(dq_data_lock); | |||
133 | EXPORT_SYMBOL(dq_data_lock); | 133 | EXPORT_SYMBOL(dq_data_lock); |
134 | 134 | ||
135 | void __quota_error(struct super_block *sb, const char *func, | 135 | void __quota_error(struct super_block *sb, const char *func, |
136 | const char *fmt, ...) | 136 | const char *fmt, ...) |
137 | { | 137 | { |
138 | va_list args; | ||
139 | |||
140 | if (printk_ratelimit()) { | 138 | if (printk_ratelimit()) { |
139 | va_list args; | ||
140 | struct va_format vaf; | ||
141 | |||
141 | va_start(args, fmt); | 142 | va_start(args, fmt); |
142 | printk(KERN_ERR "Quota error (device %s): %s: ", | 143 | |
143 | sb->s_id, func); | 144 | vaf.fmt = fmt; |
144 | vprintk(fmt, args); | 145 | vaf.va = &args; |
145 | printk("\n"); | 146 | |
147 | printk(KERN_ERR "Quota error (device %s): %s: %pV\n", | ||
148 | sb->s_id, func, &vaf); | ||
149 | |||
146 | va_end(args); | 150 | va_end(args); |
147 | } | 151 | } |
148 | } | 152 | } |
diff --git a/fs/quota/quota_tree.c b/fs/quota/quota_tree.c index 9e48874eabcc..e41c1becf096 100644 --- a/fs/quota/quota_tree.c +++ b/fs/quota/quota_tree.c | |||
@@ -468,8 +468,8 @@ static int remove_tree(struct qtree_mem_dqinfo *info, struct dquot *dquot, | |||
468 | return -ENOMEM; | 468 | return -ENOMEM; |
469 | ret = read_blk(info, *blk, buf); | 469 | ret = read_blk(info, *blk, buf); |
470 | if (ret < 0) { | 470 | if (ret < 0) { |
471 | quota_error(dquot->dq_sb, "Can't read quota data " | 471 | quota_error(dquot->dq_sb, "Can't read quota data block %u", |
472 | "block %u", blk); | 472 | *blk); |
473 | goto out_buf; | 473 | goto out_buf; |
474 | } | 474 | } |
475 | newblk = le32_to_cpu(ref[get_index(info, dquot->dq_id, depth)]); | 475 | newblk = le32_to_cpu(ref[get_index(info, dquot->dq_id, depth)]); |
@@ -493,8 +493,9 @@ static int remove_tree(struct qtree_mem_dqinfo *info, struct dquot *dquot, | |||
493 | } else { | 493 | } else { |
494 | ret = write_blk(info, *blk, buf); | 494 | ret = write_blk(info, *blk, buf); |
495 | if (ret < 0) | 495 | if (ret < 0) |
496 | quota_error(dquot->dq_sb, "Can't write quota " | 496 | quota_error(dquot->dq_sb, |
497 | "tree block %u", blk); | 497 | "Can't write quota tree block %u", |
498 | *blk); | ||
498 | } | 499 | } |
499 | } | 500 | } |
500 | out_buf: | 501 | out_buf: |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index d1a9193960f1..223b14cd129c 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -31,8 +31,9 @@ static inline bool is_quota_modification(struct inode *inode, struct iattr *ia) | |||
31 | #define quota_error(sb, fmt, args...) \ | 31 | #define quota_error(sb, fmt, args...) \ |
32 | __quota_error((sb), __func__, fmt , ## args) | 32 | __quota_error((sb), __func__, fmt , ## args) |
33 | 33 | ||
34 | extern void __quota_error(struct super_block *sb, const char *func, | 34 | extern __attribute__((format (printf, 3, 4))) |
35 | const char *fmt, ...); | 35 | void __quota_error(struct super_block *sb, const char *func, |
36 | const char *fmt, ...); | ||
36 | 37 | ||
37 | /* | 38 | /* |
38 | * declaration of quota_function calls in kernel. | 39 | * declaration of quota_function calls in kernel. |