aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/xattr.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-03-19 23:11:43 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-03-19 23:11:43 -0400
commitace36ad431c6820c2a8718cee85e5294d6e19747 (patch)
treeb912bf7cf277cbca3bb04d71e973ad1cbf62b432 /fs/ext4/xattr.c
parent7f6a11e73d755ce82497ee4ac79d85aa10f73a38 (diff)
ext4: add no_printk argument validation, fix fallout
Add argument validation to debug functions. Use ##__VA_ARGS__. Fix format and argument mismatches. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/xattr.c')
-rw-r--r--fs/ext4/xattr.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 3369157df852..e88748e55c0f 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -82,8 +82,8 @@
82 printk("\n"); \ 82 printk("\n"); \
83 } while (0) 83 } while (0)
84#else 84#else
85# define ea_idebug(f...) 85# define ea_idebug(inode, fmt, ...) no_printk(fmt, ##__VA_ARGS__)
86# define ea_bdebug(f...) 86# define ea_bdebug(bh, fmt, ...) no_printk(fmt, ##__VA_ARGS__)
87#endif 87#endif
88 88
89static void ext4_xattr_cache_insert(struct buffer_head *); 89static void ext4_xattr_cache_insert(struct buffer_head *);
@@ -217,7 +217,8 @@ ext4_xattr_block_get(struct inode *inode, int name_index, const char *name,
217 error = -ENODATA; 217 error = -ENODATA;
218 if (!EXT4_I(inode)->i_file_acl) 218 if (!EXT4_I(inode)->i_file_acl)
219 goto cleanup; 219 goto cleanup;
220 ea_idebug(inode, "reading block %u", EXT4_I(inode)->i_file_acl); 220 ea_idebug(inode, "reading block %llu",
221 (unsigned long long)EXT4_I(inode)->i_file_acl);
221 bh = sb_bread(inode->i_sb, EXT4_I(inode)->i_file_acl); 222 bh = sb_bread(inode->i_sb, EXT4_I(inode)->i_file_acl);
222 if (!bh) 223 if (!bh)
223 goto cleanup; 224 goto cleanup;
@@ -360,7 +361,8 @@ ext4_xattr_block_list(struct dentry *dentry, char *buffer, size_t buffer_size)
360 error = 0; 361 error = 0;
361 if (!EXT4_I(inode)->i_file_acl) 362 if (!EXT4_I(inode)->i_file_acl)
362 goto cleanup; 363 goto cleanup;
363 ea_idebug(inode, "reading block %u", EXT4_I(inode)->i_file_acl); 364 ea_idebug(inode, "reading block %llu",
365 (unsigned long long)EXT4_I(inode)->i_file_acl);
364 bh = sb_bread(inode->i_sb, EXT4_I(inode)->i_file_acl); 366 bh = sb_bread(inode->i_sb, EXT4_I(inode)->i_file_acl);
365 error = -EIO; 367 error = -EIO;
366 if (!bh) 368 if (!bh)
@@ -832,7 +834,8 @@ inserted:
832 if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) 834 if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)))
833 BUG_ON(block > EXT4_MAX_BLOCK_FILE_PHYS); 835 BUG_ON(block > EXT4_MAX_BLOCK_FILE_PHYS);
834 836
835 ea_idebug(inode, "creating block %d", block); 837 ea_idebug(inode, "creating block %llu",
838 (unsigned long long)block);
836 839
837 new_bh = sb_getblk(sb, block); 840 new_bh = sb_getblk(sb, block);
838 if (!new_bh) { 841 if (!new_bh) {