diff options
Diffstat (limited to 'fs/gfs2/glock.c')
-rw-r--r-- | fs/gfs2/glock.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 6e30fd17c55a..77d7927bcd75 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -912,7 +912,7 @@ int gfs2_glock_wait(struct gfs2_holder *gh) | |||
912 | */ | 912 | */ |
913 | 913 | ||
914 | static void handle_callback(struct gfs2_glock *gl, unsigned int state, | 914 | static void handle_callback(struct gfs2_glock *gl, unsigned int state, |
915 | unsigned long delay) | 915 | unsigned long delay, bool remote) |
916 | { | 916 | { |
917 | int bit = delay ? GLF_PENDING_DEMOTE : GLF_DEMOTE; | 917 | int bit = delay ? GLF_PENDING_DEMOTE : GLF_DEMOTE; |
918 | 918 | ||
@@ -925,7 +925,7 @@ static void handle_callback(struct gfs2_glock *gl, unsigned int state, | |||
925 | gl->gl_demote_state = LM_ST_UNLOCKED; | 925 | gl->gl_demote_state = LM_ST_UNLOCKED; |
926 | } | 926 | } |
927 | if (gl->gl_ops->go_callback) | 927 | if (gl->gl_ops->go_callback) |
928 | gl->gl_ops->go_callback(gl); | 928 | gl->gl_ops->go_callback(gl, remote); |
929 | trace_gfs2_demote_rq(gl); | 929 | trace_gfs2_demote_rq(gl); |
930 | } | 930 | } |
931 | 931 | ||
@@ -1091,7 +1091,7 @@ void gfs2_glock_dq(struct gfs2_holder *gh) | |||
1091 | 1091 | ||
1092 | spin_lock(&gl->gl_spin); | 1092 | spin_lock(&gl->gl_spin); |
1093 | if (gh->gh_flags & GL_NOCACHE) | 1093 | if (gh->gh_flags & GL_NOCACHE) |
1094 | handle_callback(gl, LM_ST_UNLOCKED, 0); | 1094 | handle_callback(gl, LM_ST_UNLOCKED, 0, false); |
1095 | 1095 | ||
1096 | list_del_init(&gh->gh_list); | 1096 | list_del_init(&gh->gh_list); |
1097 | if (find_first_holder(gl) == NULL) { | 1097 | if (find_first_holder(gl) == NULL) { |
@@ -1296,7 +1296,7 @@ void gfs2_glock_cb(struct gfs2_glock *gl, unsigned int state) | |||
1296 | } | 1296 | } |
1297 | 1297 | ||
1298 | spin_lock(&gl->gl_spin); | 1298 | spin_lock(&gl->gl_spin); |
1299 | handle_callback(gl, state, delay); | 1299 | handle_callback(gl, state, delay, true); |
1300 | spin_unlock(&gl->gl_spin); | 1300 | spin_unlock(&gl->gl_spin); |
1301 | if (queue_delayed_work(glock_workqueue, &gl->gl_work, delay) == 0) | 1301 | if (queue_delayed_work(glock_workqueue, &gl->gl_work, delay) == 0) |
1302 | gfs2_glock_put(gl); | 1302 | gfs2_glock_put(gl); |
@@ -1409,7 +1409,7 @@ __acquires(&lru_lock) | |||
1409 | spin_unlock(&lru_lock); | 1409 | spin_unlock(&lru_lock); |
1410 | spin_lock(&gl->gl_spin); | 1410 | spin_lock(&gl->gl_spin); |
1411 | if (demote_ok(gl)) | 1411 | if (demote_ok(gl)) |
1412 | handle_callback(gl, LM_ST_UNLOCKED, 0); | 1412 | handle_callback(gl, LM_ST_UNLOCKED, 0, false); |
1413 | WARN_ON(!test_and_clear_bit(GLF_LOCK, &gl->gl_flags)); | 1413 | WARN_ON(!test_and_clear_bit(GLF_LOCK, &gl->gl_flags)); |
1414 | smp_mb__after_clear_bit(); | 1414 | smp_mb__after_clear_bit(); |
1415 | if (queue_delayed_work(glock_workqueue, &gl->gl_work, 0) == 0) | 1415 | if (queue_delayed_work(glock_workqueue, &gl->gl_work, 0) == 0) |
@@ -1534,7 +1534,7 @@ static void clear_glock(struct gfs2_glock *gl) | |||
1534 | 1534 | ||
1535 | spin_lock(&gl->gl_spin); | 1535 | spin_lock(&gl->gl_spin); |
1536 | if (gl->gl_state != LM_ST_UNLOCKED) | 1536 | if (gl->gl_state != LM_ST_UNLOCKED) |
1537 | handle_callback(gl, LM_ST_UNLOCKED, 0); | 1537 | handle_callback(gl, LM_ST_UNLOCKED, 0, false); |
1538 | spin_unlock(&gl->gl_spin); | 1538 | spin_unlock(&gl->gl_spin); |
1539 | gfs2_glock_hold(gl); | 1539 | gfs2_glock_hold(gl); |
1540 | if (queue_delayed_work(glock_workqueue, &gl->gl_work, 0) == 0) | 1540 | if (queue_delayed_work(glock_workqueue, &gl->gl_work, 0) == 0) |