提交 ef497f8a 编写于 作者: E Eric Sandeen 提交者: Tim Shimmin

[XFS] the "aendp" arg to xfs_dir2_data_freescan is always NULL, remove it.

Patch provided by Eric Sandeen.

SGI-PV: 961694
SGI-Modid: xfs-linux-melb:xfs-kern:28204a
Signed-off-by: NEric Sandeen <sandeen@sandeen.net>
Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
Signed-off-by: NTim Shimmin <tes@sgi.com>
上级 1c72bf90
...@@ -282,8 +282,7 @@ xfs_dir2_block_addname( ...@@ -282,8 +282,7 @@ xfs_dir2_block_addname(
* This needs to happen before the next call to use_free. * This needs to happen before the next call to use_free.
*/ */
if (needscan) { if (needscan) {
xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)block, xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)block, &needlog);
&needlog, NULL);
needscan = 0; needscan = 0;
} }
} }
...@@ -333,7 +332,7 @@ xfs_dir2_block_addname( ...@@ -333,7 +332,7 @@ xfs_dir2_block_addname(
*/ */
if (needscan) { if (needscan) {
xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)block, xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)block,
&needlog, NULL); &needlog);
needscan = 0; needscan = 0;
} }
/* /*
...@@ -418,8 +417,7 @@ xfs_dir2_block_addname( ...@@ -418,8 +417,7 @@ xfs_dir2_block_addname(
* Clean up the bestfree array and log the header, tail, and entry. * Clean up the bestfree array and log the header, tail, and entry.
*/ */
if (needscan) if (needscan)
xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)block, &needlog, xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)block, &needlog);
NULL);
if (needlog) if (needlog)
xfs_dir2_data_log_header(tp, bp); xfs_dir2_data_log_header(tp, bp);
xfs_dir2_block_log_tail(tp, bp); xfs_dir2_block_log_tail(tp, bp);
...@@ -798,8 +796,7 @@ xfs_dir2_block_removename( ...@@ -798,8 +796,7 @@ xfs_dir2_block_removename(
* Fix up bestfree, log the header if necessary. * Fix up bestfree, log the header if necessary.
*/ */
if (needscan) if (needscan)
xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)block, &needlog, xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)block, &needlog);
NULL);
if (needlog) if (needlog)
xfs_dir2_data_log_header(tp, bp); xfs_dir2_data_log_header(tp, bp);
xfs_dir2_data_check(dp, bp); xfs_dir2_data_check(dp, bp);
...@@ -996,8 +993,7 @@ xfs_dir2_leaf_to_block( ...@@ -996,8 +993,7 @@ xfs_dir2_leaf_to_block(
* Scan the bestfree if we need it and log the data block header. * Scan the bestfree if we need it and log the data block header.
*/ */
if (needscan) if (needscan)
xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)block, &needlog, xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)block, &needlog);
NULL);
if (needlog) if (needlog)
xfs_dir2_data_log_header(tp, dbp); xfs_dir2_data_log_header(tp, dbp);
/* /*
......
...@@ -324,8 +324,7 @@ void ...@@ -324,8 +324,7 @@ void
xfs_dir2_data_freescan( xfs_dir2_data_freescan(
xfs_mount_t *mp, /* filesystem mount point */ xfs_mount_t *mp, /* filesystem mount point */
xfs_dir2_data_t *d, /* data block pointer */ xfs_dir2_data_t *d, /* data block pointer */
int *loghead, /* out: log data header */ int *loghead) /* out: log data header */
char *aendp) /* in: caller's endp */
{ {
xfs_dir2_block_tail_t *btp; /* block tail */ xfs_dir2_block_tail_t *btp; /* block tail */
xfs_dir2_data_entry_t *dep; /* active data entry */ xfs_dir2_data_entry_t *dep; /* active data entry */
...@@ -346,9 +345,7 @@ xfs_dir2_data_freescan( ...@@ -346,9 +345,7 @@ xfs_dir2_data_freescan(
* Set up pointers. * Set up pointers.
*/ */
p = (char *)d->u; p = (char *)d->u;
if (aendp) if (be32_to_cpu(d->hdr.magic) == XFS_DIR2_BLOCK_MAGIC) {
endp = aendp;
else if (be32_to_cpu(d->hdr.magic) == XFS_DIR2_BLOCK_MAGIC) {
btp = XFS_DIR2_BLOCK_TAIL_P(mp, (xfs_dir2_block_t *)d); btp = XFS_DIR2_BLOCK_TAIL_P(mp, (xfs_dir2_block_t *)d);
endp = (char *)XFS_DIR2_BLOCK_LEAF_P(btp); endp = (char *)XFS_DIR2_BLOCK_LEAF_P(btp);
} else } else
......
...@@ -166,7 +166,7 @@ extern xfs_dir2_data_free_t *xfs_dir2_data_freefind(xfs_dir2_data_t *d, ...@@ -166,7 +166,7 @@ extern xfs_dir2_data_free_t *xfs_dir2_data_freefind(xfs_dir2_data_t *d,
extern xfs_dir2_data_free_t *xfs_dir2_data_freeinsert(xfs_dir2_data_t *d, extern xfs_dir2_data_free_t *xfs_dir2_data_freeinsert(xfs_dir2_data_t *d,
xfs_dir2_data_unused_t *dup, int *loghead); xfs_dir2_data_unused_t *dup, int *loghead);
extern void xfs_dir2_data_freescan(struct xfs_mount *mp, xfs_dir2_data_t *d, extern void xfs_dir2_data_freescan(struct xfs_mount *mp, xfs_dir2_data_t *d,
int *loghead, char *aendp); int *loghead);
extern int xfs_dir2_data_init(struct xfs_da_args *args, xfs_dir2_db_t blkno, extern int xfs_dir2_data_init(struct xfs_da_args *args, xfs_dir2_db_t blkno,
struct xfs_dabuf **bpp); struct xfs_dabuf **bpp);
extern void xfs_dir2_data_log_entry(struct xfs_trans *tp, struct xfs_dabuf *bp, extern void xfs_dir2_data_log_entry(struct xfs_trans *tp, struct xfs_dabuf *bp,
......
...@@ -133,8 +133,7 @@ xfs_dir2_block_to_leaf( ...@@ -133,8 +133,7 @@ xfs_dir2_block_to_leaf(
*/ */
block->hdr.magic = cpu_to_be32(XFS_DIR2_DATA_MAGIC); block->hdr.magic = cpu_to_be32(XFS_DIR2_DATA_MAGIC);
if (needscan) if (needscan)
xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)block, &needlog, xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)block, &needlog);
NULL);
/* /*
* Set up leaf tail and bests table. * Set up leaf tail and bests table.
*/ */
...@@ -414,7 +413,7 @@ xfs_dir2_leaf_addname( ...@@ -414,7 +413,7 @@ xfs_dir2_leaf_addname(
* Need to scan fix up the bestfree table. * Need to scan fix up the bestfree table.
*/ */
if (needscan) if (needscan)
xfs_dir2_data_freescan(mp, data, &needlog, NULL); xfs_dir2_data_freescan(mp, data, &needlog);
/* /*
* Need to log the data block's header. * Need to log the data block's header.
*/ */
...@@ -1496,7 +1495,7 @@ xfs_dir2_leaf_removename( ...@@ -1496,7 +1495,7 @@ xfs_dir2_leaf_removename(
* log the data block header if necessary. * log the data block header if necessary.
*/ */
if (needscan) if (needscan)
xfs_dir2_data_freescan(mp, data, &needlog, NULL); xfs_dir2_data_freescan(mp, data, &needlog);
if (needlog) if (needlog)
xfs_dir2_data_log_header(tp, dbp); xfs_dir2_data_log_header(tp, dbp);
/* /*
......
...@@ -904,7 +904,7 @@ xfs_dir2_leafn_remove( ...@@ -904,7 +904,7 @@ xfs_dir2_leafn_remove(
* Log the data block header if needed. * Log the data block header if needed.
*/ */
if (needscan) if (needscan)
xfs_dir2_data_freescan(mp, data, &needlog, NULL); xfs_dir2_data_freescan(mp, data, &needlog);
if (needlog) if (needlog)
xfs_dir2_data_log_header(tp, dbp); xfs_dir2_data_log_header(tp, dbp);
xfs_dir2_data_check(dp, dbp); xfs_dir2_data_check(dp, dbp);
...@@ -1705,7 +1705,7 @@ xfs_dir2_node_addname_int( ...@@ -1705,7 +1705,7 @@ xfs_dir2_node_addname_int(
* Rescan the block for bestfree if needed. * Rescan the block for bestfree if needed.
*/ */
if (needscan) if (needscan)
xfs_dir2_data_freescan(mp, data, &needlog, NULL); xfs_dir2_data_freescan(mp, data, &needlog);
/* /*
* Log the data block header if needed. * Log the data block header if needed.
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册