aboutsummaryrefslogtreecommitdiff
path: root/fs/gfs2/glops.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-07-27 13:53:53 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-07-27 13:53:53 -0400
commitf45b7ddd2bae1dc98e35c3611b55cba6d2a8da9e (patch)
treeb2c498fc65855cb0f7ec17b9e2a42200aae633af /fs/gfs2/glops.c
parentae4a382004fc6cf229c51deaf69910410d313e0b (diff)
[GFS2] Use a bio to read the superblock
This means that we don't need to create a special inode just to contain a struct address_space in order to read a single disk block. Instead we read the disk block directly. Its slightly faster, and uses slightly less memory, but the real reason for doing this is that it removes a special case from the glock code. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
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 3f909a81a07..75d4c50cff4 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)
}
/**
- * meta_go_demote_ok - Check to see if it's ok to unlock a glock
- * @gl: the glock
- *
- * Returns: 1 if we have no cached data; ok to demote meta glock
- */
-
-static int meta_go_demote_ok(struct gfs2_glock *gl)
-{
- return !gl->gl_aspace->i_mapping->nrpages;
-}
-
-/**
* inode_go_xmote_th - promote/demote a glock
* @gl: the glock
* @state: the requested state
@@ -338,11 +326,12 @@ static void inode_go_unlock(struct gfs2_holder *gh)
struct gfs2_glock *gl = gh->gh_gl;
struct gfs2_inode *ip = gl->gl_object;
- if (ip && test_bit(GLF_DIRTY, &gl->gl_flags))
- gfs2_inode_attr_in(ip);
+ if (ip) {
+ if (test_bit(GLF_DIRTY, &gl->gl_flags))
+ gfs2_inode_attr_in(ip);
- if (ip)
gfs2_meta_cache_flush(ip);
+ }
}
/**
@@ -507,9 +496,6 @@ static int quota_go_demote_ok(struct gfs2_glock *gl)
struct gfs2_glock_operations gfs2_meta_glops = {
.go_xmote_th = gfs2_glock_xmote_th,
.go_drop_th = gfs2_glock_drop_th,
- .go_sync = meta_go_sync,
- .go_inval = meta_go_inval,
- .go_demote_ok = meta_go_demote_ok,
.go_type = LM_TYPE_META
};