[GFS2] Audit printk and kmalloc
All printk calls now have KERN_ set where required and a couple of
kmalloc(), memset(.., 0, ...) calls changed to kzalloc().
This is in response to comments from:
Pekka Enberg <penberg@cs.helsinki.fi> and
Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/ondisk.c b/fs/gfs2/ondisk.c
index 854b504..964abd2 100644
--- a/fs/gfs2/ondisk.c
+++ b/fs/gfs2/ondisk.c
@@ -17,7 +17,7 @@
#include "gfs2.h"
#include <linux/gfs2_ondisk.h>
-#define pv(struct, member, fmt) printk(" "#member" = "fmt"\n", struct->member);
+#define pv(struct, member, fmt) printk(KERN_INFO " "#member" = "fmt"\n", struct->member);
#define pa(struct, member, count) print_array(#member, struct->member, count);
/**
@@ -32,11 +32,11 @@
{
int x;
- printk(" %s =\n", title);
+ printk(KERN_INFO " %s =\n" KERN_INFO, title);
for (x = 0; x < count; x++) {
printk("%.2X ", (unsigned char)buf[x]);
if (x % 16 == 15)
- printk("\n");
+ printk("\n" KERN_INFO);
}
if (x % 16)
printk("\n");
@@ -338,7 +338,7 @@
memset(buf, 0, GFS2_FNAMESIZE + 1);
memcpy(buf, name, de->de_name_len);
- printk(" name = %s\n", buf);
+ printk(KERN_INFO " name = %s\n", buf);
}
void gfs2_leaf_in(struct gfs2_leaf *lf, char *buf)
@@ -401,7 +401,7 @@
memset(buf, 0, GFS2_EA_MAX_NAME_LEN + 1);
memcpy(buf, name, ea->ea_name_len);
- printk(" name = %s\n", buf);
+ printk(KERN_INFO " name = %s\n", buf);
}
void gfs2_log_header_in(struct gfs2_log_header *lh, char *buf)