aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glock.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-11-20 10:37:45 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-11-30 10:36:30 -0500
commit1a14d3a68f04527546121eb7b45187ff6af63151 (patch)
tree7bc48436f7c6aad5433398311b67a10661e2633d /fs/gfs2/glock.c
parentfa2ecfc5e11b12f25b67f9c84ac6b0e74a6a0115 (diff)
[GFS2] Simplify glops functions
The go_sync callback took two flags, but one of them was set on every call, so this patch removes once of the flags and makes the previously conditional operations (on this flag), unconditional. The go_inval callback took three flags, each of which was set on every call to it. This patch removes the flags and makes the operations unconditional, which makes the logic rather more obvious. Two now unused flags are also removed from incore.h. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/glock.c')
-rw-r--r--fs/gfs2/glock.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index edc21c8d7faa..b8ba4d5c1d9e 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -847,12 +847,12 @@ static void xmote_bh(struct gfs2_glock *gl, unsigned int ret)
847 847
848 if (prev_state != LM_ST_UNLOCKED && !(ret & LM_OUT_CACHEABLE)) { 848 if (prev_state != LM_ST_UNLOCKED && !(ret & LM_OUT_CACHEABLE)) {
849 if (glops->go_inval) 849 if (glops->go_inval)
850 glops->go_inval(gl, DIO_METADATA | DIO_DATA); 850 glops->go_inval(gl, DIO_METADATA);
851 } else if (gl->gl_state == LM_ST_DEFERRED) { 851 } else if (gl->gl_state == LM_ST_DEFERRED) {
852 /* We might not want to do this here. 852 /* We might not want to do this here.
853 Look at moving to the inode glops. */ 853 Look at moving to the inode glops. */
854 if (glops->go_inval) 854 if (glops->go_inval)
855 glops->go_inval(gl, DIO_DATA); 855 glops->go_inval(gl, 0);
856 } 856 }
857 857
858 /* Deal with each possible exit condition */ 858 /* Deal with each possible exit condition */
@@ -954,7 +954,7 @@ void gfs2_glock_xmote_th(struct gfs2_glock *gl, unsigned int state, int flags)
954 gfs2_assert_warn(sdp, state != gl->gl_state); 954 gfs2_assert_warn(sdp, state != gl->gl_state);
955 955
956 if (gl->gl_state == LM_ST_EXCLUSIVE && glops->go_sync) 956 if (gl->gl_state == LM_ST_EXCLUSIVE && glops->go_sync)
957 glops->go_sync(gl, DIO_METADATA | DIO_DATA | DIO_RELEASE); 957 glops->go_sync(gl);
958 958
959 gfs2_glock_hold(gl); 959 gfs2_glock_hold(gl);
960 gl->gl_req_bh = xmote_bh; 960 gl->gl_req_bh = xmote_bh;
@@ -995,7 +995,7 @@ static void drop_bh(struct gfs2_glock *gl, unsigned int ret)
995 state_change(gl, LM_ST_UNLOCKED); 995 state_change(gl, LM_ST_UNLOCKED);
996 996
997 if (glops->go_inval) 997 if (glops->go_inval)
998 glops->go_inval(gl, DIO_METADATA | DIO_DATA); 998 glops->go_inval(gl, DIO_METADATA);
999 999
1000 if (gh) { 1000 if (gh) {
1001 spin_lock(&gl->gl_spin); 1001 spin_lock(&gl->gl_spin);
@@ -1041,7 +1041,7 @@ void gfs2_glock_drop_th(struct gfs2_glock *gl)
1041 gfs2_assert_warn(sdp, gl->gl_state != LM_ST_UNLOCKED); 1041 gfs2_assert_warn(sdp, gl->gl_state != LM_ST_UNLOCKED);
1042 1042
1043 if (gl->gl_state == LM_ST_EXCLUSIVE && glops->go_sync) 1043 if (gl->gl_state == LM_ST_EXCLUSIVE && glops->go_sync)
1044 glops->go_sync(gl, DIO_METADATA | DIO_DATA | DIO_RELEASE); 1044 glops->go_sync(gl);
1045 1045
1046 gfs2_glock_hold(gl); 1046 gfs2_glock_hold(gl);
1047 gl->gl_req_bh = drop_bh; 1047 gl->gl_req_bh = drop_bh;