[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/super.c b/fs/gfs2/super.c
index be80771..60e2666 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -94,7 +94,7 @@
if (sb->sb_header.mh_magic != GFS2_MAGIC ||
sb->sb_header.mh_type != GFS2_METATYPE_SB) {
if (!silent)
- printk("GFS2: not a GFS2 filesystem\n");
+ printk(KERN_WARNING "GFS2: not a GFS2 filesystem\n");
return -EINVAL;
}
@@ -110,11 +110,11 @@
break;
if (!gfs2_old_fs_formats[x]) {
- printk("GFS2: code version (%u, %u) is incompatible "
+ printk(KERN_WARNING "GFS2: code version (%u, %u) is incompatible "
"with ondisk format (%u, %u)\n",
GFS2_FORMAT_FS, GFS2_FORMAT_MULTI,
sb->sb_fs_format, sb->sb_multihost_format);
- printk("GFS2: I don't know how to upgrade this FS\n");
+ printk(KERN_WARNING "GFS2: I don't know how to upgrade this FS\n");
return -EINVAL;
}
}
@@ -125,23 +125,23 @@
break;
if (!gfs2_old_multihost_formats[x]) {
- printk("GFS2: code version (%u, %u) is incompatible "
+ printk(KERN_WARNING "GFS2: code version (%u, %u) is incompatible "
"with ondisk format (%u, %u)\n",
GFS2_FORMAT_FS, GFS2_FORMAT_MULTI,
sb->sb_fs_format, sb->sb_multihost_format);
- printk("GFS2: I don't know how to upgrade this FS\n");
+ printk(KERN_WARNING "GFS2: I don't know how to upgrade this FS\n");
return -EINVAL;
}
}
if (!sdp->sd_args.ar_upgrade) {
- printk("GFS2: code version (%u, %u) is incompatible "
+ printk(KERN_WARNING "GFS2: code version (%u, %u) is incompatible "
"with ondisk format (%u, %u)\n",
GFS2_FORMAT_FS, GFS2_FORMAT_MULTI,
sb->sb_fs_format, sb->sb_multihost_format);
- printk("GFS2: Use the \"upgrade\" mount option to upgrade "
+ printk(KERN_INFO "GFS2: Use the \"upgrade\" mount option to upgrade "
"the FS\n");
- printk("GFS2: See the manual for more details\n");
+ printk(KERN_INFO "GFS2: See the manual for more details\n");
return -EINVAL;
}