xfs: remove infinite loop when reserving free block pool
authorDarrick J. Wong <djwong@kernel.org>
Fri, 19 Aug 2022 18:14:26 +0000 (11:14 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:40:47 +0000 (11:40 +0200)
commit07e17dcd03e0b4267d3c71796cd18796b97bed4e
treeed3492a151427bb59ddbc100d6d700a9669db681
parent130b5965da3ab1aae20411fcf98469fbe062e9ce
xfs: remove infinite loop when reserving free block pool

[ Upstream commit 15f04fdc75aaaa1cccb0b8b3af1be290e118a7bc ]

Infinite loops in kernel code are scary.  Calls to xfs_reserve_blocks
should be rare (people should just use the defaults!) so we really don't
need to try so hard.  Simplify the logic here by removing the infinite
loop.

Cc: Brian Foster <bfoster@redhat.com>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Leah Rumancik <leah.rumancik@gmail.com>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_fsops.c