aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/glops.c')
-rw-r--r--fs/gfs2/glops.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index 3f909a81a071..75d4c50cff45 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -157,18 +157,6 @@ static void meta_go_inval(struct gfs2_glock *gl, int flags)
157} 157}
158 158
159/** 159/**
160 * meta_go_demote_ok - Check to see if it's ok to unlock a glock
161 * @gl: the glock
162 *
163 * Returns: 1 if we have no cached data; ok to demote meta glock
164 */
165
166static int meta_go_demote_ok(struct gfs2_glock *gl)
167{
168 return !gl->gl_aspace->i_mapping->nrpages;
169}
170
171/**
172 * inode_go_xmote_th - promote/demote a glock 160 * inode_go_xmote_th - promote/demote a glock
173 * @gl: the glock 161 * @gl: the glock
174 * @state: the requested state 162 * @state: the requested state
@@ -338,11 +326,12 @@ static void inode_go_unlock(struct gfs2_holder *gh)
338 struct gfs2_glock *gl = gh->gh_gl; 326 struct gfs2_glock *gl = gh->gh_gl;
339 struct gfs2_inode *ip = gl->gl_object; 327 struct gfs2_inode *ip = gl->gl_object;
340 328
341 if (ip && test_bit(GLF_DIRTY, &gl->gl_flags)) 329 if (ip) {
342 gfs2_inode_attr_in(ip); 330 if (test_bit(GLF_DIRTY, &gl->gl_flags))
331 gfs2_inode_attr_in(ip);
343 332
344 if (ip)
345 gfs2_meta_cache_flush(ip); 333 gfs2_meta_cache_flush(ip);
334 }
346} 335}
347 336
348/** 337/**
@@ -507,9 +496,6 @@ static int quota_go_demote_ok(struct gfs2_glock *gl)
507struct gfs2_glock_operations gfs2_meta_glops = { 496struct gfs2_glock_operations gfs2_meta_glops = {
508 .go_xmote_th = gfs2_glock_xmote_th, 497 .go_xmote_th = gfs2_glock_xmote_th,
509 .go_drop_th = gfs2_glock_drop_th, 498 .go_drop_th = gfs2_glock_drop_th,
510 .go_sync = meta_go_sync,
511 .go_inval = meta_go_inval,
512 .go_demote_ok = meta_go_demote_ok,
513 .go_type = LM_TYPE_META 499 .go_type = LM_TYPE_META
514}; 500};
515 501