mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
80f4781d2c
commit
8381e60227
|
@ -73,8 +73,7 @@ static const char valid_change[16] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static int gfs2_rbm_find(struct gfs2_rbm *rbm, u8 state, u32 *minext,
|
static int gfs2_rbm_find(struct gfs2_rbm *rbm, u8 state, u32 *minext,
|
||||||
const struct gfs2_inode *ip, bool nowrap,
|
const struct gfs2_inode *ip, bool nowrap);
|
||||||
const struct gfs2_alloc_parms *ap);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1512,7 +1511,7 @@ static void rg_mblk_search(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip,
|
||||||
if (WARN_ON(gfs2_rbm_from_block(&rbm, goal)))
|
if (WARN_ON(gfs2_rbm_from_block(&rbm, goal)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ret = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, &extlen, ip, true, ap);
|
ret = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, &extlen, ip, true);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
rs->rs_rbm = rbm;
|
rs->rs_rbm = rbm;
|
||||||
rs->rs_free = extlen;
|
rs->rs_free = extlen;
|
||||||
|
@ -1639,7 +1638,6 @@ static int gfs2_reservation_check_and_update(struct gfs2_rbm *rbm,
|
||||||
* @ip: If set, check for reservations
|
* @ip: If set, check for reservations
|
||||||
* @nowrap: Stop looking at the end of the rgrp, rather than wrapping
|
* @nowrap: Stop looking at the end of the rgrp, rather than wrapping
|
||||||
* around until we've reached the starting point.
|
* around until we've reached the starting point.
|
||||||
* @ap: the allocation parameters
|
|
||||||
*
|
*
|
||||||
* Side effects:
|
* Side effects:
|
||||||
* - If looking for free blocks, we set GBF_FULL on each bitmap which
|
* - If looking for free blocks, we set GBF_FULL on each bitmap which
|
||||||
|
@ -1651,8 +1649,7 @@ static int gfs2_reservation_check_and_update(struct gfs2_rbm *rbm,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int gfs2_rbm_find(struct gfs2_rbm *rbm, u8 state, u32 *minext,
|
static int gfs2_rbm_find(struct gfs2_rbm *rbm, u8 state, u32 *minext,
|
||||||
const struct gfs2_inode *ip, bool nowrap,
|
const struct gfs2_inode *ip, bool nowrap)
|
||||||
const struct gfs2_alloc_parms *ap)
|
|
||||||
{
|
{
|
||||||
struct buffer_head *bh;
|
struct buffer_head *bh;
|
||||||
int initial_bii;
|
int initial_bii;
|
||||||
|
@ -1773,7 +1770,7 @@ static void try_rgrp_unlink(struct gfs2_rgrpd *rgd, u64 *last_unlinked, u64 skip
|
||||||
while (1) {
|
while (1) {
|
||||||
down_write(&sdp->sd_log_flush_lock);
|
down_write(&sdp->sd_log_flush_lock);
|
||||||
error = gfs2_rbm_find(&rbm, GFS2_BLKST_UNLINKED, NULL, NULL,
|
error = gfs2_rbm_find(&rbm, GFS2_BLKST_UNLINKED, NULL, NULL,
|
||||||
true, NULL);
|
true);
|
||||||
up_write(&sdp->sd_log_flush_lock);
|
up_write(&sdp->sd_log_flush_lock);
|
||||||
if (error == -ENOSPC)
|
if (error == -ENOSPC)
|
||||||
break;
|
break;
|
||||||
|
@ -2330,12 +2327,11 @@ int gfs2_alloc_blocks(struct gfs2_inode *ip, u64 *bn, unsigned int *nblocks,
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
gfs2_set_alloc_start(&rbm, ip, dinode);
|
gfs2_set_alloc_start(&rbm, ip, dinode);
|
||||||
error = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, NULL, ip, false, NULL);
|
error = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, NULL, ip, false);
|
||||||
|
|
||||||
if (error == -ENOSPC) {
|
if (error == -ENOSPC) {
|
||||||
gfs2_set_alloc_start(&rbm, ip, dinode);
|
gfs2_set_alloc_start(&rbm, ip, dinode);
|
||||||
error = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, NULL, NULL, false,
|
error = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, NULL, NULL, false);
|
||||||
NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Since all blocks are reserved in advance, this shouldn't happen */
|
/* Since all blocks are reserved in advance, this shouldn't happen */
|
||||||
|
|
Loading…
Reference in New Issue