提交 77ca1eed 编写于 作者: D Darrick J. Wong

xfs: fix incorrect test in xfs_alloc_ag_vextent_lastblock

When I lifted the code in xfs_alloc_ag_vextent_lastblock out of a loop,
I forgot to convert all the accesses to len to be pointer dereferences.

Coverity-id: 1457918
Fixes: 5113f8ec ("xfs: clean up weird while loop in xfs_alloc_ag_vextent_near")
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: NBrian Foster <bfoster@redhat.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
上级 faf8ee84
...@@ -1514,7 +1514,7 @@ xfs_alloc_ag_vextent_lastblock( ...@@ -1514,7 +1514,7 @@ xfs_alloc_ag_vextent_lastblock(
* maxlen, go to the start of this block, and skip all those smaller * maxlen, go to the start of this block, and skip all those smaller
* than minlen. * than minlen.
*/ */
if (len || args->alignment > 1) { if (*len || args->alignment > 1) {
acur->cnt->bc_ptrs[0] = 1; acur->cnt->bc_ptrs[0] = 1;
do { do {
error = xfs_alloc_get_rec(acur->cnt, bno, len, &i); error = xfs_alloc_get_rec(acur->cnt, bno, len, &i);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册