From d92a8d48085df863032110d9ccb221cde98d14e1 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Mon, 27 Feb 2006 10:57:14 -0500 Subject: [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 and Eric Sesterhenn Signed-off-by: Steven Whitehouse --- fs/gfs2/locking.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'fs/gfs2/locking.c') diff --git a/fs/gfs2/locking.c b/fs/gfs2/locking.c index 2d2f8fe5399..0f4c50ebcba 100644 --- a/fs/gfs2/locking.c +++ b/fs/gfs2/locking.c @@ -46,18 +46,17 @@ int gfs_register_lockproto(struct lm_lockops *proto) list_for_each_entry(lw, &lmh_list, lw_list) { if (!strcmp(lw->lw_ops->lm_proto_name, proto->lm_proto_name)) { up(&lmh_lock); - printk("GFS2: protocol %s already exists\n", + printk(KERN_INFO "GFS2: protocol %s already exists\n", proto->lm_proto_name); return -EEXIST; } } - lw = kmalloc(sizeof(struct lmh_wrapper), GFP_KERNEL); + lw = kzalloc(sizeof(struct lmh_wrapper), GFP_KERNEL); if (!lw) { up(&lmh_lock); return -ENOMEM; } - memset(lw, 0, sizeof(struct lmh_wrapper)); lw->lw_ops = proto; list_add(&lw->lw_list, &lmh_list); @@ -90,7 +89,7 @@ void gfs_unregister_lockproto(struct lm_lockops *proto) up(&lmh_lock); - printk("GFS2: can't unregister lock protocol %s\n", + printk(KERN_WARNING "GFS2: can't unregister lock protocol %s\n", proto->lm_proto_name); } @@ -136,7 +135,7 @@ int gfs2_mount_lockproto(char *proto_name, char *table_name, char *host_data, request_module(proto_name); goto retry; } - printk("GFS2: can't find protocol %s\n", proto_name); + printk(KERN_INFO "GFS2: can't find protocol %s\n", proto_name); error = -ENOENT; goto out; } -- cgit v1.2.3