diff options
author | Bob Peterson <rpeterso@redhat.com> | 2016-05-02 10:42:49 -0400 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2016-05-02 10:49:22 -0400 |
commit | 8381e6022755863258a352128a55e375a766f50d (patch) | |
tree | 781c720da2e39b5efbaa62dd9b07e81818a9d240 /fs/gfs2/rgrp.c | |
parent | 80f4781d2c0ba63bf9ab4de90a6829a1368b80a3 (diff) |
GFS2: Remove allocation parms from gfs2_rbm_find
Struct gfs2_alloc_parms ap is never referenced in function
gfs2_rbm_find, so this patch removes it.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/rgrp.c')
-rw-r--r-- | fs/gfs2/rgrp.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 07c0265aa195..8b580e535ad4 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -73,8 +73,7 @@ static const char valid_change[16] = { | |||
73 | }; | 73 | }; |
74 | 74 | ||
75 | static int gfs2_rbm_find(struct gfs2_rbm *rbm, u8 state, u32 *minext, | 75 | static int gfs2_rbm_find(struct gfs2_rbm *rbm, u8 state, u32 *minext, |
76 | const struct gfs2_inode *ip, bool nowrap, | 76 | const struct gfs2_inode *ip, bool nowrap); |
77 | const struct gfs2_alloc_parms *ap); | ||
78 | 77 | ||
79 | 78 | ||
80 | /** | 79 | /** |
@@ -1512,7 +1511,7 @@ static void rg_mblk_search(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip, | |||
1512 | if (WARN_ON(gfs2_rbm_from_block(&rbm, goal))) | 1511 | if (WARN_ON(gfs2_rbm_from_block(&rbm, goal))) |
1513 | return; | 1512 | return; |
1514 | 1513 | ||
1515 | ret = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, &extlen, ip, true, ap); | 1514 | ret = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, &extlen, ip, true); |
1516 | if (ret == 0) { | 1515 | if (ret == 0) { |
1517 | rs->rs_rbm = rbm; | 1516 | rs->rs_rbm = rbm; |
1518 | rs->rs_free = extlen; | 1517 | rs->rs_free = extlen; |
@@ -1639,7 +1638,6 @@ fail: | |||
1639 | * @ip: If set, check for reservations | 1638 | * @ip: If set, check for reservations |
1640 | * @nowrap: Stop looking at the end of the rgrp, rather than wrapping | 1639 | * @nowrap: Stop looking at the end of the rgrp, rather than wrapping |
1641 | * around until we've reached the starting point. | 1640 | * around until we've reached the starting point. |
1642 | * @ap: the allocation parameters | ||
1643 | * | 1641 | * |
1644 | * Side effects: | 1642 | * Side effects: |
1645 | * - If looking for free blocks, we set GBF_FULL on each bitmap which | 1643 | * - If looking for free blocks, we set GBF_FULL on each bitmap which |
@@ -1651,8 +1649,7 @@ fail: | |||
1651 | */ | 1649 | */ |
1652 | 1650 | ||
1653 | static int gfs2_rbm_find(struct gfs2_rbm *rbm, u8 state, u32 *minext, | 1651 | static int gfs2_rbm_find(struct gfs2_rbm *rbm, u8 state, u32 *minext, |
1654 | const struct gfs2_inode *ip, bool nowrap, | 1652 | const struct gfs2_inode *ip, bool nowrap) |
1655 | const struct gfs2_alloc_parms *ap) | ||
1656 | { | 1653 | { |
1657 | struct buffer_head *bh; | 1654 | struct buffer_head *bh; |
1658 | int initial_bii; | 1655 | int initial_bii; |
@@ -1773,7 +1770,7 @@ static void try_rgrp_unlink(struct gfs2_rgrpd *rgd, u64 *last_unlinked, u64 skip | |||
1773 | while (1) { | 1770 | while (1) { |
1774 | down_write(&sdp->sd_log_flush_lock); | 1771 | down_write(&sdp->sd_log_flush_lock); |
1775 | error = gfs2_rbm_find(&rbm, GFS2_BLKST_UNLINKED, NULL, NULL, | 1772 | error = gfs2_rbm_find(&rbm, GFS2_BLKST_UNLINKED, NULL, NULL, |
1776 | true, NULL); | 1773 | true); |
1777 | up_write(&sdp->sd_log_flush_lock); | 1774 | up_write(&sdp->sd_log_flush_lock); |
1778 | if (error == -ENOSPC) | 1775 | if (error == -ENOSPC) |
1779 | break; | 1776 | break; |
@@ -2330,12 +2327,11 @@ int gfs2_alloc_blocks(struct gfs2_inode *ip, u64 *bn, unsigned int *nblocks, | |||
2330 | int error; | 2327 | int error; |
2331 | 2328 | ||
2332 | gfs2_set_alloc_start(&rbm, ip, dinode); | 2329 | gfs2_set_alloc_start(&rbm, ip, dinode); |
2333 | error = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, NULL, ip, false, NULL); | 2330 | error = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, NULL, ip, false); |
2334 | 2331 | ||
2335 | if (error == -ENOSPC) { | 2332 | if (error == -ENOSPC) { |
2336 | gfs2_set_alloc_start(&rbm, ip, dinode); | 2333 | gfs2_set_alloc_start(&rbm, ip, dinode); |
2337 | error = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, NULL, NULL, false, | 2334 | error = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, NULL, NULL, false); |
2338 | NULL); | ||
2339 | } | 2335 | } |
2340 | 2336 | ||
2341 | /* Since all blocks are reserved in advance, this shouldn't happen */ | 2337 | /* Since all blocks are reserved in advance, this shouldn't happen */ |