diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-02-27 10:57:14 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-02-27 10:57:14 -0500 |
commit | d92a8d48085df863032110d9ccb221cde98d14e1 (patch) | |
tree | faf03d9c10e104f3ab3fb8264e70b4662bae5d33 /fs/gfs2/locking.c | |
parent | 2fcb4a1278ec41508d76786f4c5d23bff3b378ee (diff) |
[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>
Diffstat (limited to 'fs/gfs2/locking.c')
-rw-r--r-- | fs/gfs2/locking.c | 9 |
1 files changed, 4 insertions, 5 deletions
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; } |