Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367270
b: refs/heads/master
c: 81ffbf6
h: refs/heads/master
v: v3
  • Loading branch information
Steven Whitehouse committed Apr 10, 2013
1 parent d13a98d commit 06f29e3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 16ca9412d8018188bddda29c3fee88471b94e3cb
refs/heads/master: 81ffbf654f0cfeeb44e69832b3d301958a4108d8
12 changes: 6 additions & 6 deletions trunk/fs/gfs2/glock.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ int gfs2_glock_wait(struct gfs2_holder *gh)
*/

static void handle_callback(struct gfs2_glock *gl, unsigned int state,
unsigned long delay)
unsigned long delay, bool remote)
{
int bit = delay ? GLF_PENDING_DEMOTE : GLF_DEMOTE;

Expand All @@ -925,7 +925,7 @@ static void handle_callback(struct gfs2_glock *gl, unsigned int state,
gl->gl_demote_state = LM_ST_UNLOCKED;
}
if (gl->gl_ops->go_callback)
gl->gl_ops->go_callback(gl);
gl->gl_ops->go_callback(gl, remote);
trace_gfs2_demote_rq(gl);
}

Expand Down Expand Up @@ -1091,7 +1091,7 @@ void gfs2_glock_dq(struct gfs2_holder *gh)

spin_lock(&gl->gl_spin);
if (gh->gh_flags & GL_NOCACHE)
handle_callback(gl, LM_ST_UNLOCKED, 0);
handle_callback(gl, LM_ST_UNLOCKED, 0, false);

list_del_init(&gh->gh_list);
if (find_first_holder(gl) == NULL) {
Expand Down Expand Up @@ -1296,7 +1296,7 @@ void gfs2_glock_cb(struct gfs2_glock *gl, unsigned int state)
}

spin_lock(&gl->gl_spin);
handle_callback(gl, state, delay);
handle_callback(gl, state, delay, true);
spin_unlock(&gl->gl_spin);
if (queue_delayed_work(glock_workqueue, &gl->gl_work, delay) == 0)
gfs2_glock_put(gl);
Expand Down Expand Up @@ -1409,7 +1409,7 @@ __acquires(&lru_lock)
spin_unlock(&lru_lock);
spin_lock(&gl->gl_spin);
if (demote_ok(gl))
handle_callback(gl, LM_ST_UNLOCKED, 0);
handle_callback(gl, LM_ST_UNLOCKED, 0, false);
WARN_ON(!test_and_clear_bit(GLF_LOCK, &gl->gl_flags));
smp_mb__after_clear_bit();
if (queue_delayed_work(glock_workqueue, &gl->gl_work, 0) == 0)
Expand Down Expand Up @@ -1534,7 +1534,7 @@ static void clear_glock(struct gfs2_glock *gl)

spin_lock(&gl->gl_spin);
if (gl->gl_state != LM_ST_UNLOCKED)
handle_callback(gl, LM_ST_UNLOCKED, 0);
handle_callback(gl, LM_ST_UNLOCKED, 0, false);
spin_unlock(&gl->gl_spin);
gfs2_glock_hold(gl);
if (queue_delayed_work(glock_workqueue, &gl->gl_work, 0) == 0)
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/gfs2/glops.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,12 +515,12 @@ static int trans_go_demote_ok(const struct gfs2_glock *gl)
*
* gl_spin lock is held while calling this
*/
static void iopen_go_callback(struct gfs2_glock *gl)
static void iopen_go_callback(struct gfs2_glock *gl, bool remote)
{
struct gfs2_inode *ip = (struct gfs2_inode *)gl->gl_object;
struct gfs2_sbd *sdp = gl->gl_sbd;

if (sdp->sd_vfs->s_flags & MS_RDONLY)
if (!remote || (sdp->sd_vfs->s_flags & MS_RDONLY))
return;

if (gl->gl_demote_state == LM_ST_UNLOCKED &&
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/gfs2/incore.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ struct gfs2_glock_operations {
int (*go_lock) (struct gfs2_holder *gh);
void (*go_unlock) (struct gfs2_holder *gh);
int (*go_dump)(struct seq_file *seq, const struct gfs2_glock *gl);
void (*go_callback) (struct gfs2_glock *gl);
void (*go_callback)(struct gfs2_glock *gl, bool remote);
const int go_type;
const unsigned long go_flags;
#define GLOF_ASPACE 1
Expand Down

0 comments on commit 06f29e3

Please sign in to comment.