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 2d2f8fe53999..0f4c50ebcbad 100644 --- a/fs/gfs2/locking.c +++ b/fs/gfs2/locking.c | |||
@@ -46,18 +46,17 @@ int gfs_register_lockproto(struct lm_lockops *proto) | |||
46 | list_for_each_entry(lw, &lmh_list, lw_list) { | 46 | list_for_each_entry(lw, &lmh_list, lw_list) { |
47 | if (!strcmp(lw->lw_ops->lm_proto_name, proto->lm_proto_name)) { | 47 | if (!strcmp(lw->lw_ops->lm_proto_name, proto->lm_proto_name)) { |
48 | up(&lmh_lock); | 48 | up(&lmh_lock); |
49 | printk("GFS2: protocol %s already exists\n", | 49 | printk(KERN_INFO "GFS2: protocol %s already exists\n", |
50 | proto->lm_proto_name); | 50 | proto->lm_proto_name); |
51 | return -EEXIST; | 51 | return -EEXIST; |
52 | } | 52 | } |
53 | } | 53 | } |
54 | 54 | ||
55 | lw = kmalloc(sizeof(struct lmh_wrapper), GFP_KERNEL); | 55 | lw = kzalloc(sizeof(struct lmh_wrapper), GFP_KERNEL); |
56 | if (!lw) { | 56 | if (!lw) { |
57 | up(&lmh_lock); | 57 | up(&lmh_lock); |
58 | return -ENOMEM; | 58 | return -ENOMEM; |
59 | } | 59 | } |
60 | memset(lw, 0, sizeof(struct lmh_wrapper)); | ||
61 | 60 | ||
62 | lw->lw_ops = proto; | 61 | lw->lw_ops = proto; |
63 | list_add(&lw->lw_list, &lmh_list); | 62 | list_add(&lw->lw_list, &lmh_list); |
@@ -90,7 +89,7 @@ void gfs_unregister_lockproto(struct lm_lockops *proto) | |||
90 | 89 | ||
91 | up(&lmh_lock); | 90 | up(&lmh_lock); |
92 | 91 | ||
93 | printk("GFS2: can't unregister lock protocol %s\n", | 92 | printk(KERN_WARNING "GFS2: can't unregister lock protocol %s\n", |
94 | proto->lm_proto_name); | 93 | proto->lm_proto_name); |
95 | } | 94 | } |
96 | 95 | ||
@@ -136,7 +135,7 @@ int gfs2_mount_lockproto(char *proto_name, char *table_name, char *host_data, | |||
136 | request_module(proto_name); | 135 | request_module(proto_name); |
137 | goto retry; | 136 | goto retry; |
138 | } | 137 | } |
139 | printk("GFS2: can't find protocol %s\n", proto_name); | 138 | printk(KERN_INFO "GFS2: can't find protocol %s\n", proto_name); |
140 | error = -ENOENT; | 139 | error = -ENOENT; |
141 | goto out; | 140 | goto out; |
142 | } | 141 | } |