提交 3fefdeee 编写于 作者: E Eric Sandeen 提交者: Ben Myers

xfs: simplify xfs_setsize_buftarg callchain; remove unused arg

The "verbose" argument to xfs_setsize_buftarg_flags() has been
unused since:

ffe37436 xfs: stop using the page cache to back the buffer cache

Remove it, and fold the function into xfs_setsize_buftarg()
now that there's no need for different types of callers.

Fix inconsistent comment spacing while we're at it.
Signed-off-by: NEric Sandeen <sandeen@redhat.com>
Reviewed-by: NBrian Foster <bfoster@redhat.com>
Signed-off-by: NBen Myers <bpm@sgi.com>
上级 dc1ccc48
...@@ -1602,12 +1602,11 @@ xfs_free_buftarg( ...@@ -1602,12 +1602,11 @@ xfs_free_buftarg(
kmem_free(btp); kmem_free(btp);
} }
STATIC int int
xfs_setsize_buftarg_flags( xfs_setsize_buftarg(
xfs_buftarg_t *btp, xfs_buftarg_t *btp,
unsigned int blocksize, unsigned int blocksize,
unsigned int sectorsize, unsigned int sectorsize)
int verbose)
{ {
btp->bt_bsize = blocksize; btp->bt_bsize = blocksize;
btp->bt_sshift = ffs(sectorsize) - 1; btp->bt_sshift = ffs(sectorsize) - 1;
...@@ -1628,26 +1627,17 @@ xfs_setsize_buftarg_flags( ...@@ -1628,26 +1627,17 @@ xfs_setsize_buftarg_flags(
} }
/* /*
* When allocating the initial buffer target we have not yet * When allocating the initial buffer target we have not yet
* read in the superblock, so don't know what sized sectors * read in the superblock, so don't know what sized sectors
* are being used at this early stage. Play safe. * are being used at this early stage. Play safe.
*/ */
STATIC int STATIC int
xfs_setsize_buftarg_early( xfs_setsize_buftarg_early(
xfs_buftarg_t *btp, xfs_buftarg_t *btp,
struct block_device *bdev) struct block_device *bdev)
{ {
return xfs_setsize_buftarg_flags(btp, return xfs_setsize_buftarg(btp, PAGE_SIZE,
PAGE_SIZE, bdev_logical_block_size(bdev), 0); bdev_logical_block_size(bdev));
}
int
xfs_setsize_buftarg(
xfs_buftarg_t *btp,
unsigned int blocksize,
unsigned int sectorsize)
{
return xfs_setsize_buftarg_flags(btp, blocksize, sectorsize, 1);
} }
xfs_buftarg_t * xfs_buftarg_t *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册