diff options
Diffstat (limited to 'fs/gfs2/glock.c')
-rw-r--r-- | fs/gfs2/glock.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index ca0be6c69a26..aec7f73832f0 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * of the GNU General Public License version 2. | 7 | * of the GNU General Public License version 2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
11 | |||
10 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
11 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
12 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
@@ -468,7 +470,7 @@ retry: | |||
468 | do_xmote(gl, gh, LM_ST_UNLOCKED); | 470 | do_xmote(gl, gh, LM_ST_UNLOCKED); |
469 | break; | 471 | break; |
470 | default: /* Everything else */ | 472 | default: /* Everything else */ |
471 | printk(KERN_ERR "GFS2: wanted %u got %u\n", gl->gl_target, state); | 473 | pr_err("wanted %u got %u\n", gl->gl_target, state); |
472 | GLOCK_BUG_ON(gl, 1); | 474 | GLOCK_BUG_ON(gl, 1); |
473 | } | 475 | } |
474 | spin_unlock(&gl->gl_spin); | 476 | spin_unlock(&gl->gl_spin); |
@@ -542,7 +544,7 @@ __acquires(&gl->gl_spin) | |||
542 | /* lock_dlm */ | 544 | /* lock_dlm */ |
543 | ret = sdp->sd_lockstruct.ls_ops->lm_lock(gl, target, lck_flags); | 545 | ret = sdp->sd_lockstruct.ls_ops->lm_lock(gl, target, lck_flags); |
544 | if (ret) { | 546 | if (ret) { |
545 | printk(KERN_ERR "GFS2: lm_lock ret %d\n", ret); | 547 | pr_err("lm_lock ret %d\n", ret); |
546 | GLOCK_BUG_ON(gl, 1); | 548 | GLOCK_BUG_ON(gl, 1); |
547 | } | 549 | } |
548 | } else { /* lock_nolock */ | 550 | } else { /* lock_nolock */ |
@@ -935,7 +937,7 @@ void gfs2_print_dbg(struct seq_file *seq, const char *fmt, ...) | |||
935 | vaf.fmt = fmt; | 937 | vaf.fmt = fmt; |
936 | vaf.va = &args; | 938 | vaf.va = &args; |
937 | 939 | ||
938 | printk(KERN_ERR " %pV", &vaf); | 940 | pr_err("%pV", &vaf); |
939 | } | 941 | } |
940 | 942 | ||
941 | va_end(args); | 943 | va_end(args); |
@@ -1010,13 +1012,13 @@ do_cancel: | |||
1010 | return; | 1012 | return; |
1011 | 1013 | ||
1012 | trap_recursive: | 1014 | trap_recursive: |
1013 | printk(KERN_ERR "original: %pSR\n", (void *)gh2->gh_ip); | 1015 | pr_err("original: %pSR\n", (void *)gh2->gh_ip); |
1014 | printk(KERN_ERR "pid: %d\n", pid_nr(gh2->gh_owner_pid)); | 1016 | pr_err("pid: %d\n", pid_nr(gh2->gh_owner_pid)); |
1015 | printk(KERN_ERR "lock type: %d req lock state : %d\n", | 1017 | pr_err("lock type: %d req lock state : %d\n", |
1016 | gh2->gh_gl->gl_name.ln_type, gh2->gh_state); | 1018 | gh2->gh_gl->gl_name.ln_type, gh2->gh_state); |
1017 | printk(KERN_ERR "new: %pSR\n", (void *)gh->gh_ip); | 1019 | pr_err("new: %pSR\n", (void *)gh->gh_ip); |
1018 | printk(KERN_ERR "pid: %d\n", pid_nr(gh->gh_owner_pid)); | 1020 | pr_err("pid: %d\n", pid_nr(gh->gh_owner_pid)); |
1019 | printk(KERN_ERR "lock type: %d req lock state : %d\n", | 1021 | pr_err("lock type: %d req lock state : %d\n", |
1020 | gh->gh_gl->gl_name.ln_type, gh->gh_state); | 1022 | gh->gh_gl->gl_name.ln_type, gh->gh_state); |
1021 | gfs2_dump_glock(NULL, gl); | 1023 | gfs2_dump_glock(NULL, gl); |
1022 | BUG(); | 1024 | BUG(); |
@@ -1045,9 +1047,13 @@ int gfs2_glock_nq(struct gfs2_holder *gh) | |||
1045 | 1047 | ||
1046 | spin_lock(&gl->gl_spin); | 1048 | spin_lock(&gl->gl_spin); |
1047 | add_to_queue(gh); | 1049 | add_to_queue(gh); |
1048 | if ((LM_FLAG_NOEXP & gh->gh_flags) && | 1050 | if (unlikely((LM_FLAG_NOEXP & gh->gh_flags) && |
1049 | test_and_clear_bit(GLF_FROZEN, &gl->gl_flags)) | 1051 | test_and_clear_bit(GLF_FROZEN, &gl->gl_flags))) { |
1050 | set_bit(GLF_REPLY_PENDING, &gl->gl_flags); | 1052 | set_bit(GLF_REPLY_PENDING, &gl->gl_flags); |
1053 | gl->gl_lockref.count++; | ||
1054 | if (queue_delayed_work(glock_workqueue, &gl->gl_work, 0) == 0) | ||
1055 | gl->gl_lockref.count--; | ||
1056 | } | ||
1051 | run_queue(gl, 1); | 1057 | run_queue(gl, 1); |
1052 | spin_unlock(&gl->gl_spin); | 1058 | spin_unlock(&gl->gl_spin); |
1053 | 1059 | ||