aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/locking/dlm
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/locking/dlm
parent[GFS2] Update documentation (diff)
downloadlinux-dev-d92a8d48085df863032110d9ccb221cde98d14e1.tar.xz
linux-dev-d92a8d48085df863032110d9ccb221cde98d14e1.zip
[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/dlm')
-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
3 files changed, 13 insertions, 11 deletions
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)
struct gdlm_ls *ls = lp->ls;
if (!mode) {
- printk("lock_dlm: bast mode zero %x,%llx\n",
+ printk(KERN_INFO "lock_dlm: bast mode zero %x,%llx\n",
lp->lockname.ln_type, lp->lockname.ln_number);
return;
}
@@ -408,7 +408,7 @@ static int hold_null_lock(struct gdlm_lock *lp)
int error;
if (lp->hold_null) {
- printk("lock_dlm: lvb already held\n");
+ printk(KERN_INFO "lock_dlm: lvb already held\n");
return 0;
}
@@ -429,7 +429,8 @@ static int hold_null_lock(struct gdlm_lock *lp)
wait_for_completion(&lpn->ast_wait);
error = lp->lksb.sb_status;
if (error) {
- printk("lock_dlm: hold_null_lock dlm error %d\n", error);
+ printk(KERN_INFO "lock_dlm: hold_null_lock dlm error %d\n",
+ error);
gdlm_delete_lp(lpn);
lpn = NULL;
}
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)
error = gfs_register_lockproto(&gdlm_ops);
if (error) {
- printk("lock_dlm: can't register protocol: %d\n", error);
+ printk(KERN_WARNING "lock_dlm: can't register protocol: %d\n", error);
return error;
}
@@ -42,7 +42,7 @@ int __init init_lock_dlm(void)
gdlm_drop_count = GDLM_DROP_COUNT;
gdlm_drop_period = GDLM_DROP_PERIOD;
- printk("Lock_DLM (built %s %s) installed\n", __DATE__, __TIME__);
+ printk(KERN_INFO "Lock_DLM (built %s %s) installed\n", __DATE__, __TIME__);
return 0;
}
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,
spin_lock(&ops_lock);
if (!list_empty(&op->list)) {
- printk("plock op on list\n");
+ printk(KERN_INFO "plock op on list\n");
list_del(&op->list);
}
spin_unlock(&ops_lock);
@@ -127,7 +127,7 @@ int gdlm_punlock(lm_lockspace_t *lockspace, struct lm_lockname *name,
spin_lock(&ops_lock);
if (!list_empty(&op->list)) {
- printk("punlock op on list\n");
+ printk(KERN_INFO "punlock op on list\n");
list_del(&op->list);
}
spin_unlock(&ops_lock);
@@ -162,7 +162,7 @@ int gdlm_plock_get(lm_lockspace_t *lockspace, struct lm_lockname *name,
spin_lock(&ops_lock);
if (!list_empty(&op->list)) {
- printk("plock_get op on list\n");
+ printk(KERN_INFO "plock_get op on list\n");
list_del(&op->list);
}
spin_unlock(&ops_lock);
@@ -242,7 +242,7 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count,
if (found)
wake_up(&recv_wq);
else
- printk("gdlm dev_write no op %x %llx\n", info.fsid,
+ printk(KERN_INFO "gdlm dev_write no op %x %llx\n", info.fsid,
info.number);
return count;
}
@@ -285,13 +285,14 @@ int gdlm_plock_init(void)
rv = misc_register(&plock_dev_misc);
if (rv)
- printk("gdlm_plock_init: misc_register failed %d", rv);
+ printk(KERN_INFO "gdlm_plock_init: misc_register failed %d",
+ rv);
return rv;
}
void gdlm_plock_exit(void)
{
if (misc_deregister(&plock_dev_misc) < 0)
- printk("gdlm_plock_exit: misc_deregister failed");
+ printk(KERN_INFO "gdlm_plock_exit: misc_deregister failed");
}