diff options
Diffstat (limited to 'fs/gfs2/glock.c')
-rw-r--r-- | fs/gfs2/glock.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index d00dc37e3d51..63981e2fb835 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -765,7 +765,6 @@ static void drop_bh(struct gfs2_glock *gl, unsigned int ret) | |||
765 | { | 765 | { |
766 | struct gfs2_sbd *sdp = gl->gl_sbd; | 766 | struct gfs2_sbd *sdp = gl->gl_sbd; |
767 | const struct gfs2_glock_operations *glops = gl->gl_ops; | 767 | const struct gfs2_glock_operations *glops = gl->gl_ops; |
768 | struct gfs2_holder *gh = gl->gl_req_gh; | ||
769 | 768 | ||
770 | gfs2_assert_warn(sdp, test_bit(GLF_LOCK, &gl->gl_flags)); | 769 | gfs2_assert_warn(sdp, test_bit(GLF_LOCK, &gl->gl_flags)); |
771 | gfs2_assert_warn(sdp, list_empty(&gl->gl_holders)); | 770 | gfs2_assert_warn(sdp, list_empty(&gl->gl_holders)); |
@@ -776,23 +775,11 @@ static void drop_bh(struct gfs2_glock *gl, unsigned int ret) | |||
776 | if (glops->go_inval) | 775 | if (glops->go_inval) |
777 | glops->go_inval(gl, DIO_METADATA); | 776 | glops->go_inval(gl, DIO_METADATA); |
778 | 777 | ||
779 | if (gh) { | ||
780 | spin_lock(&gl->gl_spin); | ||
781 | list_del_init(&gh->gh_list); | ||
782 | gh->gh_error = 0; | ||
783 | spin_unlock(&gl->gl_spin); | ||
784 | } | ||
785 | |||
786 | spin_lock(&gl->gl_spin); | 778 | spin_lock(&gl->gl_spin); |
787 | gfs2_demote_wake(gl); | 779 | gfs2_demote_wake(gl); |
788 | gl->gl_req_gh = NULL; | ||
789 | clear_bit(GLF_LOCK, &gl->gl_flags); | 780 | clear_bit(GLF_LOCK, &gl->gl_flags); |
790 | spin_unlock(&gl->gl_spin); | 781 | spin_unlock(&gl->gl_spin); |
791 | |||
792 | gfs2_glock_put(gl); | 782 | gfs2_glock_put(gl); |
793 | |||
794 | if (gh) | ||
795 | gfs2_holder_wake(gh); | ||
796 | } | 783 | } |
797 | 784 | ||
798 | /** | 785 | /** |
@@ -810,7 +797,7 @@ static void xmote_bh(struct gfs2_glock *gl, unsigned int ret) | |||
810 | int prev_state = gl->gl_state; | 797 | int prev_state = gl->gl_state; |
811 | int op_done = 1; | 798 | int op_done = 1; |
812 | 799 | ||
813 | if ((ret & LM_OUT_ST_MASK) == LM_ST_UNLOCKED) { | 800 | if (!gh && (ret & LM_OUT_ST_MASK) == LM_ST_UNLOCKED) { |
814 | drop_bh(gl, ret); | 801 | drop_bh(gl, ret); |
815 | return; | 802 | return; |
816 | } | 803 | } |