summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2018-10-03 19:06:23 -0400
committerBob Peterson <rpeterso@redhat.com>2018-10-12 08:32:28 -0400
commitc3abc29e54a14953ddb26feeb62dd02d57925e52 (patch)
tree9c51608500533df96e235afd35ad6d526fdb7903
parentec23df2b0cf3e1620f5db77972b7fb735f267eff (diff)
gfs2: Remove unnecessary gfs2_rlist_alloc parameter
The state parameter of gfs2_rlist_alloc is set to LM_ST_EXCLUSIVE in all calls, so remove it and hardcode that state in gfs2_rlist_alloc instead. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Bob Peterson <rpeterso@redhat.com> Reviewed-by: Steven Whitehouse <swhiteho@redhat.com>
-rw-r--r--fs/gfs2/dir.c2
-rw-r--r--fs/gfs2/rgrp.c5
-rw-r--r--fs/gfs2/rgrp.h2
-rw-r--r--fs/gfs2/xattr.c2
4 files changed, 5 insertions, 6 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index 2e28fc947f7f..87a6dee88a62 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -2021,7 +2021,7 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len,
2021 l_blocks++; 2021 l_blocks++;
2022 } 2022 }
2023 2023
2024 gfs2_rlist_alloc(&rlist, LM_ST_EXCLUSIVE); 2024 gfs2_rlist_alloc(&rlist);
2025 2025
2026 for (x = 0; x < rlist.rl_rgrps; x++) { 2026 for (x = 0; x < rlist.rl_rgrps; x++) {
2027 struct gfs2_rgrpd *rgd = gfs2_glock2rgrp(rlist.rl_ghs[x].gh_gl); 2027 struct gfs2_rgrpd *rgd = gfs2_glock2rgrp(rlist.rl_ghs[x].gh_gl);
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 7c5904c49a6a..7fef6789fb92 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -2668,13 +2668,12 @@ void gfs2_rlist_add(struct gfs2_inode *ip, struct gfs2_rgrp_list *rlist,
2668 * gfs2_rlist_alloc - all RGs have been added to the rlist, now allocate 2668 * gfs2_rlist_alloc - all RGs have been added to the rlist, now allocate
2669 * and initialize an array of glock holders for them 2669 * and initialize an array of glock holders for them
2670 * @rlist: the list of resource groups 2670 * @rlist: the list of resource groups
2671 * @state: the lock state to acquire the RG lock in
2672 * 2671 *
2673 * FIXME: Don't use NOFAIL 2672 * FIXME: Don't use NOFAIL
2674 * 2673 *
2675 */ 2674 */
2676 2675
2677void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist, unsigned int state) 2676void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist)
2678{ 2677{
2679 unsigned int x; 2678 unsigned int x;
2680 2679
@@ -2683,7 +2682,7 @@ void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist, unsigned int state)
2683 GFP_NOFS | __GFP_NOFAIL); 2682 GFP_NOFS | __GFP_NOFAIL);
2684 for (x = 0; x < rlist->rl_rgrps; x++) 2683 for (x = 0; x < rlist->rl_rgrps; x++)
2685 gfs2_holder_init(rlist->rl_rgd[x]->rd_gl, 2684 gfs2_holder_init(rlist->rl_rgd[x]->rd_gl,
2686 state, 0, 2685 LM_ST_EXCLUSIVE, 0,
2687 &rlist->rl_ghs[x]); 2686 &rlist->rl_ghs[x]);
2688} 2687}
2689 2688
diff --git a/fs/gfs2/rgrp.h b/fs/gfs2/rgrp.h
index 6bb5ee112324..09519ae10fb6 100644
--- a/fs/gfs2/rgrp.h
+++ b/fs/gfs2/rgrp.h
@@ -67,7 +67,7 @@ struct gfs2_rgrp_list {
67 67
68extern void gfs2_rlist_add(struct gfs2_inode *ip, struct gfs2_rgrp_list *rlist, 68extern void gfs2_rlist_add(struct gfs2_inode *ip, struct gfs2_rgrp_list *rlist,
69 u64 block); 69 u64 block);
70extern void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist, unsigned int state); 70extern void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist);
71extern void gfs2_rlist_free(struct gfs2_rgrp_list *rlist); 71extern void gfs2_rlist_free(struct gfs2_rgrp_list *rlist);
72extern u64 gfs2_ri_total(struct gfs2_sbd *sdp); 72extern u64 gfs2_ri_total(struct gfs2_sbd *sdp);
73extern void gfs2_rgrp_dump(struct seq_file *seq, const struct gfs2_glock *gl); 73extern void gfs2_rgrp_dump(struct seq_file *seq, const struct gfs2_glock *gl);
diff --git a/fs/gfs2/xattr.c b/fs/gfs2/xattr.c
index 38515988aaf7..e11f77f080a0 100644
--- a/fs/gfs2/xattr.c
+++ b/fs/gfs2/xattr.c
@@ -1299,7 +1299,7 @@ static int ea_dealloc_indirect(struct gfs2_inode *ip)
1299 else 1299 else
1300 goto out; 1300 goto out;
1301 1301
1302 gfs2_rlist_alloc(&rlist, LM_ST_EXCLUSIVE); 1302 gfs2_rlist_alloc(&rlist);
1303 1303
1304 for (x = 0; x < rlist.rl_rgrps; x++) { 1304 for (x = 0; x < rlist.rl_rgrps; x++) {
1305 struct gfs2_rgrpd *rgd = gfs2_glock2rgrp(rlist.rl_ghs[x].gh_gl); 1305 struct gfs2_rgrpd *rgd = gfs2_glock2rgrp(rlist.rl_ghs[x].gh_gl);