aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2016-04-01 13:18:38 -0400
committerBob Peterson <rpeterso@redhat.com>2016-04-05 11:59:18 -0400
commit73cc86252bd8a547349d2856497eceaf4f2d1766 (patch)
tree6dda7db9bc8ed1be8e252219e58b1f84539a6302 /fs/gfs2
parent3e11e530415027a57936545957126aff49267b76 (diff)
GFS2: Get rid of dead code in inode_go_demote_ok
Function inode_go_demote_ok had some code that was only executed if gl_holders was not empty. However, if gl_holders was not empty, the only caller, demote_ok(), returns before inode_go_demote_ok would ever be called. Therefore, it's dead code, so I removed it. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/glops.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index 437fd73e381e..5db59d444838 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -286,17 +286,10 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags)
286static int inode_go_demote_ok(const struct gfs2_glock *gl) 286static int inode_go_demote_ok(const struct gfs2_glock *gl)
287{ 287{
288 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; 288 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
289 struct gfs2_holder *gh;
290 289
291 if (sdp->sd_jindex == gl->gl_object || sdp->sd_rindex == gl->gl_object) 290 if (sdp->sd_jindex == gl->gl_object || sdp->sd_rindex == gl->gl_object)
292 return 0; 291 return 0;
293 292
294 if (!list_empty(&gl->gl_holders)) {
295 gh = list_entry(gl->gl_holders.next, struct gfs2_holder, gh_list);
296 if (gh->gh_list.next != &gl->gl_holders)
297 return 0;
298 }
299
300 return 1; 293 return 1;
301} 294}
302 295