Commit 3c69c437 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher

gfs2: Rename sd_{ glock => kill }_wait

Rename sd_glock_wait to sd_kill_wait: we'll use it for other things
related to "killing" a filesystem on unmount soon (kill_sb).
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 481f6e7d
...@@ -176,7 +176,7 @@ void gfs2_glock_free(struct gfs2_glock *gl) ...@@ -176,7 +176,7 @@ void gfs2_glock_free(struct gfs2_glock *gl)
wake_up_glock(gl); wake_up_glock(gl);
call_rcu(&gl->gl_rcu, gfs2_glock_dealloc); call_rcu(&gl->gl_rcu, gfs2_glock_dealloc);
if (atomic_dec_and_test(&sdp->sd_glock_disposal)) if (atomic_dec_and_test(&sdp->sd_glock_disposal))
wake_up(&sdp->sd_glock_wait); wake_up(&sdp->sd_kill_wait);
} }
/** /**
...@@ -1231,7 +1231,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number, ...@@ -1231,7 +1231,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number,
out_free: out_free:
gfs2_glock_dealloc(&gl->gl_rcu); gfs2_glock_dealloc(&gl->gl_rcu);
if (atomic_dec_and_test(&sdp->sd_glock_disposal)) if (atomic_dec_and_test(&sdp->sd_glock_disposal))
wake_up(&sdp->sd_glock_wait); wake_up(&sdp->sd_kill_wait);
out: out:
return ret; return ret;
...@@ -2188,7 +2188,7 @@ void gfs2_gl_hash_clear(struct gfs2_sbd *sdp) ...@@ -2188,7 +2188,7 @@ void gfs2_gl_hash_clear(struct gfs2_sbd *sdp)
flush_workqueue(glock_workqueue); flush_workqueue(glock_workqueue);
glock_hash_walk(clear_glock, sdp); glock_hash_walk(clear_glock, sdp);
flush_workqueue(glock_workqueue); flush_workqueue(glock_workqueue);
wait_event_timeout(sdp->sd_glock_wait, wait_event_timeout(sdp->sd_kill_wait,
atomic_read(&sdp->sd_glock_disposal) == 0, atomic_read(&sdp->sd_glock_disposal) == 0,
HZ * 600); HZ * 600);
glock_hash_walk(dump_glock_func, sdp); glock_hash_walk(dump_glock_func, sdp);
......
...@@ -716,7 +716,7 @@ struct gfs2_sbd { ...@@ -716,7 +716,7 @@ struct gfs2_sbd {
struct gfs2_glock *sd_rename_gl; struct gfs2_glock *sd_rename_gl;
struct gfs2_glock *sd_freeze_gl; struct gfs2_glock *sd_freeze_gl;
struct work_struct sd_freeze_work; struct work_struct sd_freeze_work;
wait_queue_head_t sd_glock_wait; wait_queue_head_t sd_kill_wait;
wait_queue_head_t sd_async_glock_wait; wait_queue_head_t sd_async_glock_wait;
atomic_t sd_glock_disposal; atomic_t sd_glock_disposal;
struct completion sd_locking_init; struct completion sd_locking_init;
......
...@@ -87,7 +87,7 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb) ...@@ -87,7 +87,7 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb)
set_bit(SDF_NOJOURNALID, &sdp->sd_flags); set_bit(SDF_NOJOURNALID, &sdp->sd_flags);
gfs2_tune_init(&sdp->sd_tune); gfs2_tune_init(&sdp->sd_tune);
init_waitqueue_head(&sdp->sd_glock_wait); init_waitqueue_head(&sdp->sd_kill_wait);
init_waitqueue_head(&sdp->sd_async_glock_wait); init_waitqueue_head(&sdp->sd_async_glock_wait);
atomic_set(&sdp->sd_glock_disposal, 0); atomic_set(&sdp->sd_glock_disposal, 0);
init_completion(&sdp->sd_locking_init); init_completion(&sdp->sd_locking_init);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment