aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-02-27 10:57:14 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-02-27 10:57:14 -0500
commitd92a8d48085df863032110d9ccb221cde98d14e1 (patch)
treefaf03d9c10e104f3ab3fb8264e70b4662bae5d33 /fs/gfs2
parent2fcb4a1278ec41508d76786f4c5d23bff3b378ee (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')
-rw-r--r--fs/gfs2/glock.c52
-rw-r--r--fs/gfs2/locking.c9
-rw-r--r--fs/gfs2/locking/dlm/lock.c7
-rw-r--r--fs/gfs2/locking/dlm/main.c4
-rw-r--r--fs/gfs2/locking/dlm/plock.c13
-rw-r--r--fs/gfs2/locking/nolock/main.c13
-rw-r--r--fs/gfs2/ondisk.c10
-rw-r--r--fs/gfs2/ops_fstype.c4
-rw-r--r--fs/gfs2/ops_super.c2
-rw-r--r--fs/gfs2/super.c16
10 files changed, 64 insertions, 66 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index d4fa395ed39f..f30fde91d14a 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -2315,17 +2315,17 @@ static int dump_holder(char *str, struct gfs2_holder *gh)
2315 unsigned int x; 2315 unsigned int x;
2316 int error = -ENOBUFS; 2316 int error = -ENOBUFS;
2317 2317
2318 printk(" %s\n", str); 2318 printk(KERN_INFO " %s\n", str);
2319 printk(" owner = %ld\n", 2319 printk(KERN_INFO " owner = %ld\n",
2320 (gh->gh_owner) ? (long)gh->gh_owner->pid : -1); 2320 (gh->gh_owner) ? (long)gh->gh_owner->pid : -1);
2321 printk(" gh_state = %u\n", gh->gh_state); 2321 printk(KERN_INFO " gh_state = %u\n", gh->gh_state);
2322 printk(" gh_flags ="); 2322 printk(KERN_INFO " gh_flags =");
2323 for (x = 0; x < 32; x++) 2323 for (x = 0; x < 32; x++)
2324 if (gh->gh_flags & (1 << x)) 2324 if (gh->gh_flags & (1 << x))
2325 printk(" %u", x); 2325 printk(" %u", x);
2326 printk(" \n"); 2326 printk(" \n");
2327 printk(" error = %d\n", gh->gh_error); 2327 printk(KERN_INFO " error = %d\n", gh->gh_error);
2328 printk(" gh_iflags ="); 2328 printk(KERN_INFO " gh_iflags =");
2329 for (x = 0; x < 32; x++) 2329 for (x = 0; x < 32; x++)
2330 if (test_bit(x, &gh->gh_iflags)) 2330 if (test_bit(x, &gh->gh_iflags))
2331 printk(" %u", x); 2331 printk(" %u", x);
@@ -2348,17 +2348,17 @@ static int dump_inode(struct gfs2_inode *ip)
2348 unsigned int x; 2348 unsigned int x;
2349 int error = -ENOBUFS; 2349 int error = -ENOBUFS;
2350 2350
2351 printk(" Inode:\n"); 2351 printk(KERN_INFO " Inode:\n");
2352 printk(" num = %llu %llu\n", 2352 printk(KERN_INFO " num = %llu %llu\n",
2353 ip->i_num.no_formal_ino, ip->i_num.no_addr); 2353 ip->i_num.no_formal_ino, ip->i_num.no_addr);
2354 printk(" type = %u\n", IF2DT(ip->i_di.di_mode)); 2354 printk(KERN_INFO " type = %u\n", IF2DT(ip->i_di.di_mode));
2355 printk(" i_count = %d\n", atomic_read(&ip->i_count)); 2355 printk(KERN_INFO " i_count = %d\n", atomic_read(&ip->i_count));
2356 printk(" i_flags ="); 2356 printk(KERN_INFO " i_flags =");
2357 for (x = 0; x < 32; x++) 2357 for (x = 0; x < 32; x++)
2358 if (test_bit(x, &ip->i_flags)) 2358 if (test_bit(x, &ip->i_flags))
2359 printk(" %u", x); 2359 printk(" %u", x);
2360 printk(" \n"); 2360 printk(" \n");
2361 printk(" vnode = %s\n", (ip->i_vnode) ? "yes" : "no"); 2361 printk(KERN_INFO " vnode = %s\n", (ip->i_vnode) ? "yes" : "no");
2362 2362
2363 error = 0; 2363 error = 0;
2364 2364
@@ -2381,30 +2381,30 @@ static int dump_glock(struct gfs2_glock *gl)
2381 2381
2382 spin_lock(&gl->gl_spin); 2382 spin_lock(&gl->gl_spin);
2383 2383
2384 printk("Glock (%u, %llu)\n", 2384 printk(KERN_INFO "Glock (%u, %llu)\n",
2385 gl->gl_name.ln_type, 2385 gl->gl_name.ln_type,
2386 gl->gl_name.ln_number); 2386 gl->gl_name.ln_number);
2387 printk(" gl_flags ="); 2387 printk(KERN_INFO " gl_flags =");
2388 for (x = 0; x < 32; x++) 2388 for (x = 0; x < 32; x++)
2389 if (test_bit(x, &gl->gl_flags)) 2389 if (test_bit(x, &gl->gl_flags))
2390 printk(" %u", x); 2390 printk(" %u", x);
2391 printk(" \n"); 2391 printk(" \n");
2392 printk(" gl_ref = %d\n", atomic_read(&gl->gl_ref.refcount)); 2392 printk(KERN_INFO " gl_ref = %d\n", atomic_read(&gl->gl_ref.refcount));
2393 printk(" gl_state = %u\n", gl->gl_state); 2393 printk(KERN_INFO " gl_state = %u\n", gl->gl_state);
2394 printk(" req_gh = %s\n", (gl->gl_req_gh) ? "yes" : "no"); 2394 printk(KERN_INFO " req_gh = %s\n", (gl->gl_req_gh) ? "yes" : "no");
2395 printk(" req_bh = %s\n", (gl->gl_req_bh) ? "yes" : "no"); 2395 printk(KERN_INFO " req_bh = %s\n", (gl->gl_req_bh) ? "yes" : "no");
2396 printk(" lvb_count = %d\n", atomic_read(&gl->gl_lvb_count)); 2396 printk(KERN_INFO " lvb_count = %d\n", atomic_read(&gl->gl_lvb_count));
2397 printk(" object = %s\n", (gl->gl_object) ? "yes" : "no"); 2397 printk(KERN_INFO " object = %s\n", (gl->gl_object) ? "yes" : "no");
2398 printk(" le = %s\n", 2398 printk(KERN_INFO " le = %s\n",
2399 (list_empty(&gl->gl_le.le_list)) ? "no" : "yes"); 2399 (list_empty(&gl->gl_le.le_list)) ? "no" : "yes");
2400 printk(" reclaim = %s\n", 2400 printk(KERN_INFO " reclaim = %s\n",
2401 (list_empty(&gl->gl_reclaim)) ? "no" : "yes"); 2401 (list_empty(&gl->gl_reclaim)) ? "no" : "yes");
2402 if (gl->gl_aspace) 2402 if (gl->gl_aspace)
2403 printk(" aspace = %lu\n", 2403 printk(KERN_INFO " aspace = %lu\n",
2404 gl->gl_aspace->i_mapping->nrpages); 2404 gl->gl_aspace->i_mapping->nrpages);
2405 else 2405 else
2406 printk(" aspace = no\n"); 2406 printk(KERN_INFO " aspace = no\n");
2407 printk(" ail = %d\n", atomic_read(&gl->gl_ail_count)); 2407 printk(KERN_INFO " ail = %d\n", atomic_read(&gl->gl_ail_count));
2408 if (gl->gl_req_gh) { 2408 if (gl->gl_req_gh) {
2409 error = dump_holder("Request", gl->gl_req_gh); 2409 error = dump_holder("Request", gl->gl_req_gh);
2410 if (error) 2410 if (error)
@@ -2438,7 +2438,7 @@ static int dump_glock(struct gfs2_glock *gl)
2438 goto out; 2438 goto out;
2439 } else { 2439 } else {
2440 error = -ENOBUFS; 2440 error = -ENOBUFS;
2441 printk(" Inode: busy\n"); 2441 printk(KERN_INFO " Inode: busy\n");
2442 } 2442 }
2443 } 2443 }
2444 2444
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 }
diff --git a/fs/gfs2/locking/dlm/lock.c b/fs/gfs2/locking/dlm/lock.c
index 666d696dc8ce..1799d2237e7e 100644
--- a/fs/gfs2/locking/dlm/lock.c
+++ b/fs/gfs2/locking/dlm/lock.c
@@ -34,7 +34,7 @@ static inline void gdlm_bast(void *astarg, int mode)
34 struct gdlm_ls *ls = lp->ls; 34 struct gdlm_ls *ls = lp->ls;
35 35
36 if (!mode) { 36 if (!mode) {
37 printk("lock_dlm: bast mode zero %x,%llx\n", 37 printk(KERN_INFO "lock_dlm: bast mode zero %x,%llx\n",
38 lp->lockname.ln_type, lp->lockname.ln_number); 38 lp->lockname.ln_type, lp->lockname.ln_number);
39 return; 39 return;
40 } 40 }
@@ -408,7 +408,7 @@ static int hold_null_lock(struct gdlm_lock *lp)
408 int error; 408 int error;
409 409
410 if (lp->hold_null) { 410 if (lp->hold_null) {
411 printk("lock_dlm: lvb already held\n"); 411 printk(KERN_INFO "lock_dlm: lvb already held\n");
412 return 0; 412 return 0;
413 } 413 }
414 414
@@ -429,7 +429,8 @@ static int hold_null_lock(struct gdlm_lock *lp)
429 wait_for_completion(&lpn->ast_wait); 429 wait_for_completion(&lpn->ast_wait);
430 error = lp->lksb.sb_status; 430 error = lp->lksb.sb_status;
431 if (error) { 431 if (error) {
432 printk("lock_dlm: hold_null_lock dlm error %d\n", error); 432 printk(KERN_INFO "lock_dlm: hold_null_lock dlm error %d\n",
433 error);
433 gdlm_delete_lp(lpn); 434 gdlm_delete_lp(lpn);
434 lpn = NULL; 435 lpn = NULL;
435 } 436 }
diff --git a/fs/gfs2/locking/dlm/main.c b/fs/gfs2/locking/dlm/main.c
index 2c13c916a352..1c0943de9408 100644
--- a/fs/gfs2/locking/dlm/main.c
+++ b/fs/gfs2/locking/dlm/main.c
@@ -22,7 +22,7 @@ int __init init_lock_dlm(void)
22 22
23 error = gfs_register_lockproto(&gdlm_ops); 23 error = gfs_register_lockproto(&gdlm_ops);
24 if (error) { 24 if (error) {
25 printk("lock_dlm: can't register protocol: %d\n", error); 25 printk(KERN_WARNING "lock_dlm: can't register protocol: %d\n", error);
26 return error; 26 return error;
27 } 27 }
28 28
@@ -42,7 +42,7 @@ int __init init_lock_dlm(void)
42 gdlm_drop_count = GDLM_DROP_COUNT; 42 gdlm_drop_count = GDLM_DROP_COUNT;
43 gdlm_drop_period = GDLM_DROP_PERIOD; 43 gdlm_drop_period = GDLM_DROP_PERIOD;
44 44
45 printk("Lock_DLM (built %s %s) installed\n", __DATE__, __TIME__); 45 printk(KERN_INFO "Lock_DLM (built %s %s) installed\n", __DATE__, __TIME__);
46 return 0; 46 return 0;
47} 47}
48 48
diff --git a/fs/gfs2/locking/dlm/plock.c b/fs/gfs2/locking/dlm/plock.c
index 382847205bc1..f7ac5821def9 100644
--- a/fs/gfs2/locking/dlm/plock.c
+++ b/fs/gfs2/locking/dlm/plock.c
@@ -83,7 +83,7 @@ int gdlm_plock(lm_lockspace_t *lockspace, struct lm_lockname *name,
83 83
84 spin_lock(&ops_lock); 84 spin_lock(&ops_lock);
85 if (!list_empty(&op->list)) { 85 if (!list_empty(&op->list)) {
86 printk("plock op on list\n"); 86 printk(KERN_INFO "plock op on list\n");
87 list_del(&op->list); 87 list_del(&op->list);
88 } 88 }
89 spin_unlock(&ops_lock); 89 spin_unlock(&ops_lock);
@@ -127,7 +127,7 @@ int gdlm_punlock(lm_lockspace_t *lockspace, struct lm_lockname *name,
127 127
128 spin_lock(&ops_lock); 128 spin_lock(&ops_lock);
129 if (!list_empty(&op->list)) { 129 if (!list_empty(&op->list)) {
130 printk("punlock op on list\n"); 130 printk(KERN_INFO "punlock op on list\n");
131 list_del(&op->list); 131 list_del(&op->list);
132 } 132 }
133 spin_unlock(&ops_lock); 133 spin_unlock(&ops_lock);
@@ -162,7 +162,7 @@ int gdlm_plock_get(lm_lockspace_t *lockspace, struct lm_lockname *name,
162 162
163 spin_lock(&ops_lock); 163 spin_lock(&ops_lock);
164 if (!list_empty(&op->list)) { 164 if (!list_empty(&op->list)) {
165 printk("plock_get op on list\n"); 165 printk(KERN_INFO "plock_get op on list\n");
166 list_del(&op->list); 166 list_del(&op->list);
167 } 167 }
168 spin_unlock(&ops_lock); 168 spin_unlock(&ops_lock);
@@ -242,7 +242,7 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count,
242 if (found) 242 if (found)
243 wake_up(&recv_wq); 243 wake_up(&recv_wq);
244 else 244 else
245 printk("gdlm dev_write no op %x %llx\n", info.fsid, 245 printk(KERN_INFO "gdlm dev_write no op %x %llx\n", info.fsid,
246 info.number); 246 info.number);
247 return count; 247 return count;
248} 248}
@@ -285,13 +285,14 @@ int gdlm_plock_init(void)
285 285
286 rv = misc_register(&plock_dev_misc); 286 rv = misc_register(&plock_dev_misc);
287 if (rv) 287 if (rv)
288 printk("gdlm_plock_init: misc_register failed %d", rv); 288 printk(KERN_INFO "gdlm_plock_init: misc_register failed %d",
289 rv);
289 return rv; 290 return rv;
290} 291}
291 292
292void gdlm_plock_exit(void) 293void gdlm_plock_exit(void)
293{ 294{
294 if (misc_deregister(&plock_dev_misc) < 0) 295 if (misc_deregister(&plock_dev_misc) < 0)
295 printk("gdlm_plock_exit: misc_deregister failed"); 296 printk(KERN_INFO "gdlm_plock_exit: misc_deregister failed");
296} 297}
297 298
diff --git a/fs/gfs2/locking/nolock/main.c b/fs/gfs2/locking/nolock/main.c
index b716e336c073..7ede0906b2c6 100644
--- a/fs/gfs2/locking/nolock/main.c
+++ b/fs/gfs2/locking/nolock/main.c
@@ -44,11 +44,10 @@ static int nolock_mount(char *table_name, char *host_data,
44 sscanf(c, "%u", &jid); 44 sscanf(c, "%u", &jid);
45 } 45 }
46 46
47 nl = kmalloc(sizeof(struct nolock_lockspace), GFP_KERNEL); 47 nl = kzalloc(sizeof(struct nolock_lockspace), GFP_KERNEL);
48 if (!nl) 48 if (!nl)
49 return -ENOMEM; 49 return -ENOMEM;
50 50
51 memset(nl, 0, sizeof(struct nolock_lockspace));
52 nl->nl_lvb_size = min_lvb_size; 51 nl->nl_lvb_size = min_lvb_size;
53 52
54 lockstruct->ls_jid = jid; 53 lockstruct->ls_jid = jid;
@@ -147,10 +146,8 @@ static int nolock_hold_lvb(lm_lock_t *lock, char **lvbp)
147 struct nolock_lockspace *nl = (struct nolock_lockspace *)lock; 146 struct nolock_lockspace *nl = (struct nolock_lockspace *)lock;
148 int error = 0; 147 int error = 0;
149 148
150 *lvbp = kmalloc(nl->nl_lvb_size, GFP_KERNEL); 149 *lvbp = kzalloc(nl->nl_lvb_size, GFP_KERNEL);
151 if (*lvbp) 150 if (!*lvbp)
152 memset(*lvbp, 0, nl->nl_lvb_size);
153 else
154 error = -ENOMEM; 151 error = -ENOMEM;
155 152
156 return error; 153 return error;
@@ -246,11 +243,11 @@ int __init init_nolock(void)
246 243
247 error = gfs_register_lockproto(&nolock_ops); 244 error = gfs_register_lockproto(&nolock_ops);
248 if (error) { 245 if (error) {
249 printk("lock_nolock: can't register protocol: %d\n", error); 246 printk(KERN_WARNING "lock_nolock: can't register protocol: %d\n", error);
250 return error; 247 return error;
251 } 248 }
252 249
253 printk("Lock_Nolock (built %s %s) installed\n", __DATE__, __TIME__); 250 printk(KERN_INFO "Lock_Nolock (built %s %s) installed\n", __DATE__, __TIME__);
254 return 0; 251 return 0;
255} 252}
256 253
diff --git a/fs/gfs2/ondisk.c b/fs/gfs2/ondisk.c
index 854b5049b8d5..964abd2760ff 100644
--- a/fs/gfs2/ondisk.c
+++ b/fs/gfs2/ondisk.c
@@ -17,7 +17,7 @@
17#include "gfs2.h" 17#include "gfs2.h"
18#include <linux/gfs2_ondisk.h> 18#include <linux/gfs2_ondisk.h>
19 19
20#define pv(struct, member, fmt) printk(" "#member" = "fmt"\n", struct->member); 20#define pv(struct, member, fmt) printk(KERN_INFO " "#member" = "fmt"\n", struct->member);
21#define pa(struct, member, count) print_array(#member, struct->member, count); 21#define pa(struct, member, count) print_array(#member, struct->member, count);
22 22
23/** 23/**
@@ -32,11 +32,11 @@ static void print_array(char *title, char *buf, int count)
32{ 32{
33 int x; 33 int x;
34 34
35 printk(" %s =\n", title); 35 printk(KERN_INFO " %s =\n" KERN_INFO, title);
36 for (x = 0; x < count; x++) { 36 for (x = 0; x < count; x++) {
37 printk("%.2X ", (unsigned char)buf[x]); 37 printk("%.2X ", (unsigned char)buf[x]);
38 if (x % 16 == 15) 38 if (x % 16 == 15)
39 printk("\n"); 39 printk("\n" KERN_INFO);
40 } 40 }
41 if (x % 16) 41 if (x % 16)
42 printk("\n"); 42 printk("\n");
@@ -338,7 +338,7 @@ void gfs2_dirent_print(struct gfs2_dirent *de, char *name)
338 338
339 memset(buf, 0, GFS2_FNAMESIZE + 1); 339 memset(buf, 0, GFS2_FNAMESIZE + 1);
340 memcpy(buf, name, de->de_name_len); 340 memcpy(buf, name, de->de_name_len);
341 printk(" name = %s\n", buf); 341 printk(KERN_INFO " name = %s\n", buf);
342} 342}
343 343
344void gfs2_leaf_in(struct gfs2_leaf *lf, char *buf) 344void gfs2_leaf_in(struct gfs2_leaf *lf, char *buf)
@@ -401,7 +401,7 @@ void gfs2_ea_header_print(struct gfs2_ea_header *ea, char *name)
401 401
402 memset(buf, 0, GFS2_EA_MAX_NAME_LEN + 1); 402 memset(buf, 0, GFS2_EA_MAX_NAME_LEN + 1);
403 memcpy(buf, name, ea->ea_name_len); 403 memcpy(buf, name, ea->ea_name_len);
404 printk(" name = %s\n", buf); 404 printk(KERN_INFO " name = %s\n", buf);
405} 405}
406 406
407void gfs2_log_header_in(struct gfs2_log_header *lh, char *buf) 407void gfs2_log_header_in(struct gfs2_log_header *lh, char *buf)
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 751178ab497c..a85f1a2676f6 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -772,13 +772,13 @@ static int fill_super(struct super_block *sb, void *data, int silent)
772 772
773 sdp = init_sbd(sb); 773 sdp = init_sbd(sb);
774 if (!sdp) { 774 if (!sdp) {
775 printk("GFS2: can't alloc struct gfs2_sbd\n"); 775 printk(KERN_WARNING "GFS2: can't alloc struct gfs2_sbd\n");
776 return -ENOMEM; 776 return -ENOMEM;
777 } 777 }
778 778
779 error = gfs2_mount_args(sdp, (char *)data, 0); 779 error = gfs2_mount_args(sdp, (char *)data, 0);
780 if (error) { 780 if (error) {
781 printk("GFS2: can't parse mount arguments\n"); 781 printk(KERN_WARNING "GFS2: can't parse mount arguments\n");
782 goto fail; 782 goto fail;
783 } 783 }
784 784
diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c
index cd45ec93a043..48a94522406e 100644
--- a/fs/gfs2/ops_super.c
+++ b/fs/gfs2/ops_super.c
@@ -12,8 +12,8 @@
12#include <linux/spinlock.h> 12#include <linux/spinlock.h>
13#include <linux/completion.h> 13#include <linux/completion.h>
14#include <linux/buffer_head.h> 14#include <linux/buffer_head.h>
15#include <linux/vmalloc.h>
16#include <linux/statfs.h> 15#include <linux/statfs.h>
16#include <linux/vmalloc.h>
17#include <linux/seq_file.h> 17#include <linux/seq_file.h>
18#include <linux/mount.h> 18#include <linux/mount.h>
19#include <linux/kthread.h> 19#include <linux/kthread.h>
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index be80771c414d..60e266618729 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -94,7 +94,7 @@ int gfs2_check_sb(struct gfs2_sbd *sdp, struct gfs2_sb *sb, int silent)
94 if (sb->sb_header.mh_magic != GFS2_MAGIC || 94 if (sb->sb_header.mh_magic != GFS2_MAGIC ||
95 sb->sb_header.mh_type != GFS2_METATYPE_SB) { 95 sb->sb_header.mh_type != GFS2_METATYPE_SB) {
96 if (!silent) 96 if (!silent)
97 printk("GFS2: not a GFS2 filesystem\n"); 97 printk(KERN_WARNING "GFS2: not a GFS2 filesystem\n");
98 return -EINVAL; 98 return -EINVAL;
99 } 99 }
100 100
@@ -110,11 +110,11 @@ int gfs2_check_sb(struct gfs2_sbd *sdp, struct gfs2_sb *sb, int silent)
110 break; 110 break;
111 111
112 if (!gfs2_old_fs_formats[x]) { 112 if (!gfs2_old_fs_formats[x]) {
113 printk("GFS2: code version (%u, %u) is incompatible " 113 printk(KERN_WARNING "GFS2: code version (%u, %u) is incompatible "
114 "with ondisk format (%u, %u)\n", 114 "with ondisk format (%u, %u)\n",
115 GFS2_FORMAT_FS, GFS2_FORMAT_MULTI, 115 GFS2_FORMAT_FS, GFS2_FORMAT_MULTI,
116 sb->sb_fs_format, sb->sb_multihost_format); 116 sb->sb_fs_format, sb->sb_multihost_format);
117 printk("GFS2: I don't know how to upgrade this FS\n"); 117 printk(KERN_WARNING "GFS2: I don't know how to upgrade this FS\n");
118 return -EINVAL; 118 return -EINVAL;
119 } 119 }
120 } 120 }
@@ -125,23 +125,23 @@ int gfs2_check_sb(struct gfs2_sbd *sdp, struct gfs2_sb *sb, int silent)
125 break; 125 break;
126 126
127 if (!gfs2_old_multihost_formats[x]) { 127 if (!gfs2_old_multihost_formats[x]) {
128 printk("GFS2: code version (%u, %u) is incompatible " 128 printk(KERN_WARNING "GFS2: code version (%u, %u) is incompatible "
129 "with ondisk format (%u, %u)\n", 129 "with ondisk format (%u, %u)\n",
130 GFS2_FORMAT_FS, GFS2_FORMAT_MULTI, 130 GFS2_FORMAT_FS, GFS2_FORMAT_MULTI,
131 sb->sb_fs_format, sb->sb_multihost_format); 131 sb->sb_fs_format, sb->sb_multihost_format);
132 printk("GFS2: I don't know how to upgrade this FS\n"); 132 printk(KERN_WARNING "GFS2: I don't know how to upgrade this FS\n");
133 return -EINVAL; 133 return -EINVAL;
134 } 134 }
135 } 135 }
136 136
137 if (!sdp->sd_args.ar_upgrade) { 137 if (!sdp->sd_args.ar_upgrade) {
138 printk("GFS2: code version (%u, %u) is incompatible " 138 printk(KERN_WARNING "GFS2: code version (%u, %u) is incompatible "
139 "with ondisk format (%u, %u)\n", 139 "with ondisk format (%u, %u)\n",
140 GFS2_FORMAT_FS, GFS2_FORMAT_MULTI, 140 GFS2_FORMAT_FS, GFS2_FORMAT_MULTI,
141 sb->sb_fs_format, sb->sb_multihost_format); 141 sb->sb_fs_format, sb->sb_multihost_format);
142 printk("GFS2: Use the \"upgrade\" mount option to upgrade " 142 printk(KERN_INFO "GFS2: Use the \"upgrade\" mount option to upgrade "
143 "the FS\n"); 143 "the FS\n");
144 printk("GFS2: See the manual for more details\n"); 144 printk(KERN_INFO "GFS2: See the manual for more details\n");
145 return -EINVAL; 145 return -EINVAL;
146 } 146 }
147 147