diff options
author | Bob Peterson <rpeterso@redhat.com> | 2015-03-16 12:52:05 -0400 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2015-09-03 14:33:09 -0400 |
commit | 15562c439d0a1850b71aa1c0d92d1f4fb9503c8d (patch) | |
tree | 172b76ac4411cc2f1e740dc054cf15954f5e6084 /fs/gfs2/trans.c | |
parent | 81648d043191e5f8f5870c5af6060b56383b139d (diff) |
GFS2: Move glock superblock pointer to field gl_name
What uniquely identifies a glock in the glock hash table is not
gl_name, but gl_name and its superblock pointer. This patch makes
the gl_name field correspond to a unique glock identifier. That will
allow us to simplify hashing with a future patch, since the hash
algorithm can then take the gl_name and hash its components in one
operation.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r-- | fs/gfs2/trans.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index 88bff2430669..b95d0d625f32 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c | |||
@@ -158,7 +158,7 @@ static struct gfs2_bufdata *gfs2_alloc_bufdata(struct gfs2_glock *gl, | |||
158 | void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh) | 158 | void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh) |
159 | { | 159 | { |
160 | struct gfs2_trans *tr = current->journal_info; | 160 | struct gfs2_trans *tr = current->journal_info; |
161 | struct gfs2_sbd *sdp = gl->gl_sbd; | 161 | struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; |
162 | struct address_space *mapping = bh->b_page->mapping; | 162 | struct address_space *mapping = bh->b_page->mapping; |
163 | struct gfs2_inode *ip = GFS2_I(mapping->host); | 163 | struct gfs2_inode *ip = GFS2_I(mapping->host); |
164 | struct gfs2_bufdata *bd; | 164 | struct gfs2_bufdata *bd; |
@@ -224,7 +224,7 @@ static void meta_lo_add(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd) | |||
224 | void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh) | 224 | void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh) |
225 | { | 225 | { |
226 | 226 | ||
227 | struct gfs2_sbd *sdp = gl->gl_sbd; | 227 | struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; |
228 | struct gfs2_bufdata *bd; | 228 | struct gfs2_bufdata *bd; |
229 | 229 | ||
230 | lock_buffer(bh); | 230 | lock_buffer(bh); |