Skip to content

Commit 81463b1

Browse files
chandra2Alex Elder
authored andcommitted
xfs: remove variables that serve no purpose in xfs_alloc_ag_vextent_exact()
Remove two variables that serve no purpose in xfs_alloc_ag_vextent_exact(). Signed-off-by: Chandra Seetharaman <[email protected]> Signed-off-by: Alex Elder <[email protected]>
1 parent c0e090c commit 81463b1

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

fs/xfs/xfs_alloc.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -570,9 +570,7 @@ xfs_alloc_ag_vextent_exact(
570570
xfs_agblock_t tbno; /* start block of trimmed extent */
571571
xfs_extlen_t tlen; /* length of trimmed extent */
572572
xfs_agblock_t tend; /* end block of trimmed extent */
573-
xfs_agblock_t end; /* end of allocated extent */
574573
int i; /* success/failure of operation */
575-
xfs_extlen_t rlen; /* length of returned extent */
576574

577575
ASSERT(args->alignment == 1);
578576

@@ -625,18 +623,16 @@ xfs_alloc_ag_vextent_exact(
625623
*
626624
* Fix the length according to mod and prod if given.
627625
*/
628-
end = XFS_AGBLOCK_MIN(tend, args->agbno + args->maxlen);
629-
args->len = end - args->agbno;
626+
args->len = XFS_AGBLOCK_MIN(tend, args->agbno + args->maxlen)
627+
- args->agbno;
630628
xfs_alloc_fix_len(args);
631629
if (!xfs_alloc_fix_minleft(args))
632630
goto not_found;
633631

634-
rlen = args->len;
635-
ASSERT(args->agbno + rlen <= tend);
636-
end = args->agbno + rlen;
632+
ASSERT(args->agbno + args->len <= tend);
637633

638634
/*
639-
* We are allocating agbno for rlen [agbno .. end]
635+
* We are allocating agbno for args->len
640636
* Allocate/initialize a cursor for the by-size btree.
641637
*/
642638
cnt_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp,

0 commit comments

Comments
 (0)