diff options
Diffstat (limited to 'fs/gfs2/glock.c')
-rw-r--r-- | fs/gfs2/glock.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 0f317155915d..67e3f2a4d109 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -357,7 +357,6 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, uint64_t number, | |||
357 | void gfs2_holder_init(struct gfs2_glock *gl, unsigned int state, unsigned flags, | 357 | void gfs2_holder_init(struct gfs2_glock *gl, unsigned int state, unsigned flags, |
358 | struct gfs2_holder *gh) | 358 | struct gfs2_holder *gh) |
359 | { | 359 | { |
360 | flags |= GL_NEVER_RECURSE; | ||
361 | INIT_LIST_HEAD(&gh->gh_list); | 360 | INIT_LIST_HEAD(&gh->gh_list); |
362 | gh->gh_gl = gl; | 361 | gh->gh_gl = gl; |
363 | gh->gh_ip = (unsigned long)__builtin_return_address(0); | 362 | gh->gh_ip = (unsigned long)__builtin_return_address(0); |
@@ -387,7 +386,7 @@ void gfs2_holder_init(struct gfs2_glock *gl, unsigned int state, unsigned flags, | |||
387 | void gfs2_holder_reinit(unsigned int state, unsigned flags, struct gfs2_holder *gh) | 386 | void gfs2_holder_reinit(unsigned int state, unsigned flags, struct gfs2_holder *gh) |
388 | { | 387 | { |
389 | gh->gh_state = state; | 388 | gh->gh_state = state; |
390 | gh->gh_flags = flags | GL_NEVER_RECURSE; | 389 | gh->gh_flags = flags; |
391 | if (gh->gh_state == LM_ST_EXCLUSIVE) | 390 | if (gh->gh_state == LM_ST_EXCLUSIVE) |
392 | gh->gh_flags |= GL_LOCAL_EXCL; | 391 | gh->gh_flags |= GL_LOCAL_EXCL; |
393 | 392 | ||
@@ -731,8 +730,7 @@ static void handle_callback(struct gfs2_glock *gl, unsigned int state) | |||
731 | } else { | 730 | } else { |
732 | spin_unlock(&gl->gl_spin); | 731 | spin_unlock(&gl->gl_spin); |
733 | 732 | ||
734 | new_gh = gfs2_holder_get(gl, state, | 733 | new_gh = gfs2_holder_get(gl, state, LM_FLAG_TRY, |
735 | LM_FLAG_TRY | GL_NEVER_RECURSE, | ||
736 | GFP_KERNEL | __GFP_NOFAIL), | 734 | GFP_KERNEL | __GFP_NOFAIL), |
737 | set_bit(HIF_DEMOTE, &new_gh->gh_iflags); | 735 | set_bit(HIF_DEMOTE, &new_gh->gh_iflags); |
738 | set_bit(HIF_DEALLOC, &new_gh->gh_iflags); | 736 | set_bit(HIF_DEALLOC, &new_gh->gh_iflags); |
@@ -1336,7 +1334,7 @@ void gfs2_glock_force_drop(struct gfs2_glock *gl) | |||
1336 | { | 1334 | { |
1337 | struct gfs2_holder gh; | 1335 | struct gfs2_holder gh; |
1338 | 1336 | ||
1339 | gfs2_holder_init(gl, LM_ST_UNLOCKED, GL_NEVER_RECURSE, &gh); | 1337 | gfs2_holder_init(gl, LM_ST_UNLOCKED, 0, &gh); |
1340 | set_bit(HIF_DEMOTE, &gh.gh_iflags); | 1338 | set_bit(HIF_DEMOTE, &gh.gh_iflags); |
1341 | 1339 | ||
1342 | spin_lock(&gl->gl_spin); | 1340 | spin_lock(&gl->gl_spin); |
@@ -1401,7 +1399,7 @@ int gfs2_glock_be_greedy(struct gfs2_glock *gl, unsigned int time) | |||
1401 | } | 1399 | } |
1402 | gh = &gr->gr_gh; | 1400 | gh = &gr->gr_gh; |
1403 | 1401 | ||
1404 | gfs2_holder_init(gl, 0, GL_NEVER_RECURSE, gh); | 1402 | gfs2_holder_init(gl, 0, 0, gh); |
1405 | set_bit(HIF_GREEDY, &gh->gh_iflags); | 1403 | set_bit(HIF_GREEDY, &gh->gh_iflags); |
1406 | INIT_WORK(&gr->gr_work, greedy_work, gr); | 1404 | INIT_WORK(&gr->gr_work, greedy_work, gr); |
1407 | 1405 | ||