diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/gfs2/glock.c | 10 | ||||
-rw-r--r-- | fs/gfs2/glock.h | 1 | ||||
-rw-r--r-- | fs/gfs2/ops_fstype.c | 10 | ||||
-rw-r--r-- | fs/gfs2/recovery.c | 3 | ||||
-rw-r--r-- | fs/gfs2/super.c | 6 | ||||
-rw-r--r-- | fs/gfs2/trans.c | 3 |
6 files changed, 14 insertions, 19 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 | ||
diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h index ed5bc3e65397..6f9c88ed5383 100644 --- a/fs/gfs2/glock.h +++ b/fs/gfs2/glock.h | |||
@@ -26,7 +26,6 @@ | |||
26 | #define GL_NOCACHE 0x00000400 | 26 | #define GL_NOCACHE 0x00000400 |
27 | #define GL_SYNC 0x00000800 | 27 | #define GL_SYNC 0x00000800 |
28 | #define GL_NOCANCEL 0x00001000 | 28 | #define GL_NOCANCEL 0x00001000 |
29 | #define GL_NEVER_RECURSE 0x00002000 | ||
30 | #define GL_AOP 0x00004000 | 29 | #define GL_AOP 0x00004000 |
31 | 30 | ||
32 | #define GLR_TRYFAILED 13 | 31 | #define GLR_TRYFAILED 13 |
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 70745f3561a6..d19d98766aa5 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c | |||
@@ -223,7 +223,7 @@ static int init_locking(struct gfs2_sbd *sdp, struct gfs2_holder *mount_gh, | |||
223 | error = gfs2_glock_nq_num(sdp, | 223 | error = gfs2_glock_nq_num(sdp, |
224 | GFS2_LIVE_LOCK, &gfs2_nondisk_glops, | 224 | GFS2_LIVE_LOCK, &gfs2_nondisk_glops, |
225 | LM_ST_SHARED, | 225 | LM_ST_SHARED, |
226 | LM_FLAG_NOEXP | GL_EXACT | GL_NEVER_RECURSE, | 226 | LM_FLAG_NOEXP | GL_EXACT, |
227 | &sdp->sd_live_gh); | 227 | &sdp->sd_live_gh); |
228 | if (error) { | 228 | if (error) { |
229 | fs_err(sdp, "can't acquire live glock: %d\n", error); | 229 | fs_err(sdp, "can't acquire live glock: %d\n", error); |
@@ -638,7 +638,7 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo) | |||
638 | 638 | ||
639 | ip = sdp->sd_ir_inode->u.generic_ip; | 639 | ip = sdp->sd_ir_inode->u.generic_ip; |
640 | error = gfs2_glock_nq_init(ip->i_gl, | 640 | error = gfs2_glock_nq_init(ip->i_gl, |
641 | LM_ST_EXCLUSIVE, GL_NEVER_RECURSE, | 641 | LM_ST_EXCLUSIVE, 0, |
642 | &sdp->sd_ir_gh); | 642 | &sdp->sd_ir_gh); |
643 | if (error) { | 643 | if (error) { |
644 | fs_err(sdp, "can't lock local \"ir\" file: %d\n", error); | 644 | fs_err(sdp, "can't lock local \"ir\" file: %d\n", error); |
@@ -647,7 +647,7 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo) | |||
647 | 647 | ||
648 | ip = sdp->sd_sc_inode->u.generic_ip; | 648 | ip = sdp->sd_sc_inode->u.generic_ip; |
649 | error = gfs2_glock_nq_init(ip->i_gl, | 649 | error = gfs2_glock_nq_init(ip->i_gl, |
650 | LM_ST_EXCLUSIVE, GL_NEVER_RECURSE, | 650 | LM_ST_EXCLUSIVE, 0, |
651 | &sdp->sd_sc_gh); | 651 | &sdp->sd_sc_gh); |
652 | if (error) { | 652 | if (error) { |
653 | fs_err(sdp, "can't lock local \"sc\" file: %d\n", error); | 653 | fs_err(sdp, "can't lock local \"sc\" file: %d\n", error); |
@@ -656,7 +656,7 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo) | |||
656 | 656 | ||
657 | ip = sdp->sd_ut_inode->u.generic_ip; | 657 | ip = sdp->sd_ut_inode->u.generic_ip; |
658 | error = gfs2_glock_nq_init(ip->i_gl, | 658 | error = gfs2_glock_nq_init(ip->i_gl, |
659 | LM_ST_EXCLUSIVE, GL_NEVER_RECURSE, | 659 | LM_ST_EXCLUSIVE, 0, |
660 | &sdp->sd_ut_gh); | 660 | &sdp->sd_ut_gh); |
661 | if (error) { | 661 | if (error) { |
662 | fs_err(sdp, "can't lock local \"ut\" file: %d\n", error); | 662 | fs_err(sdp, "can't lock local \"ut\" file: %d\n", error); |
@@ -665,7 +665,7 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo) | |||
665 | 665 | ||
666 | ip = sdp->sd_qc_inode->u.generic_ip; | 666 | ip = sdp->sd_qc_inode->u.generic_ip; |
667 | error = gfs2_glock_nq_init(ip->i_gl, | 667 | error = gfs2_glock_nq_init(ip->i_gl, |
668 | LM_ST_EXCLUSIVE, GL_NEVER_RECURSE, | 668 | LM_ST_EXCLUSIVE, 0, |
669 | &sdp->sd_qc_gh); | 669 | &sdp->sd_qc_gh); |
670 | if (error) { | 670 | if (error) { |
671 | fs_err(sdp, "can't lock local \"qc\" file: %d\n", error); | 671 | fs_err(sdp, "can't lock local \"qc\" file: %d\n", error); |
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c index 7d467966f92c..d916817fb6e3 100644 --- a/fs/gfs2/recovery.c +++ b/fs/gfs2/recovery.c | |||
@@ -487,8 +487,7 @@ int gfs2_recover_journal(struct gfs2_jdesc *jd) | |||
487 | error = gfs2_glock_nq_init(sdp->sd_trans_gl, | 487 | error = gfs2_glock_nq_init(sdp->sd_trans_gl, |
488 | LM_ST_SHARED, | 488 | LM_ST_SHARED, |
489 | LM_FLAG_NOEXP | LM_FLAG_PRIORITY | | 489 | LM_FLAG_NOEXP | LM_FLAG_PRIORITY | |
490 | GL_NEVER_RECURSE | GL_NOCANCEL | | 490 | GL_NOCANCEL | GL_NOCACHE, |
491 | GL_NOCACHE, | ||
492 | &t_gh); | 491 | &t_gh); |
493 | if (error) | 492 | if (error) |
494 | goto fail_gunlock_ji; | 493 | goto fail_gunlock_ji; |
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index a4da649d086f..f0dbd2d7aadc 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -469,7 +469,7 @@ int gfs2_make_fs_rw(struct gfs2_sbd *sdp) | |||
469 | int error; | 469 | int error; |
470 | 470 | ||
471 | error = gfs2_glock_nq_init(sdp->sd_trans_gl, LM_ST_SHARED, | 471 | error = gfs2_glock_nq_init(sdp->sd_trans_gl, LM_ST_SHARED, |
472 | GL_LOCAL_EXCL | GL_NEVER_RECURSE, &t_gh); | 472 | GL_LOCAL_EXCL, &t_gh); |
473 | if (error) | 473 | if (error) |
474 | return error; | 474 | return error; |
475 | 475 | ||
@@ -530,7 +530,7 @@ int gfs2_make_fs_ro(struct gfs2_sbd *sdp) | |||
530 | gfs2_statfs_sync(sdp); | 530 | gfs2_statfs_sync(sdp); |
531 | 531 | ||
532 | error = gfs2_glock_nq_init(sdp->sd_trans_gl, LM_ST_SHARED, | 532 | error = gfs2_glock_nq_init(sdp->sd_trans_gl, LM_ST_SHARED, |
533 | GL_LOCAL_EXCL | GL_NEVER_RECURSE | GL_NOCACHE, | 533 | GL_LOCAL_EXCL | GL_NOCACHE, |
534 | &t_gh); | 534 | &t_gh); |
535 | if (error && !test_bit(SDF_SHUTDOWN, &sdp->sd_flags)) | 535 | if (error && !test_bit(SDF_SHUTDOWN, &sdp->sd_flags)) |
536 | return error; | 536 | return error; |
@@ -869,7 +869,7 @@ int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp, struct gfs2_holder *t_gh) | |||
869 | } | 869 | } |
870 | 870 | ||
871 | error = gfs2_glock_nq_init(sdp->sd_trans_gl, LM_ST_DEFERRED, | 871 | error = gfs2_glock_nq_init(sdp->sd_trans_gl, LM_ST_DEFERRED, |
872 | LM_FLAG_PRIORITY | GL_NEVER_RECURSE | GL_NOCACHE, | 872 | LM_FLAG_PRIORITY | GL_NOCACHE, |
873 | t_gh); | 873 | t_gh); |
874 | 874 | ||
875 | list_for_each_entry(jd, &sdp->sd_jindex_list, jd_list) { | 875 | list_for_each_entry(jd, &sdp->sd_jindex_list, jd_list) { |
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index 6b02d8c38f0f..18c606d07126 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c | |||
@@ -50,8 +50,7 @@ int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks, | |||
50 | sizeof(uint64_t)); | 50 | sizeof(uint64_t)); |
51 | INIT_LIST_HEAD(&tr->tr_list_buf); | 51 | INIT_LIST_HEAD(&tr->tr_list_buf); |
52 | 52 | ||
53 | gfs2_holder_init(sdp->sd_trans_gl, LM_ST_SHARED, | 53 | gfs2_holder_init(sdp->sd_trans_gl, LM_ST_SHARED, 0, &tr->tr_t_gh); |
54 | GL_NEVER_RECURSE, &tr->tr_t_gh); | ||
55 | 54 | ||
56 | error = gfs2_glock_nq(&tr->tr_t_gh); | 55 | error = gfs2_glock_nq(&tr->tr_t_gh); |
57 | if (error) | 56 | if (error) |