aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_rtalloc.c
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2024-08-30 22:36:50 +0000
committerDarrick J. Wong <[email protected]>2024-09-01 15:58:19 +0000
commit021d9c107e29a598e51fb66a54b22e5416125408 (patch)
treea7062c37a8aa20a57ec50bb6237843786bef4cc0 /fs/xfs/xfs_rtalloc.c
parentxfs: pass the icreate args object to xfs_dialloc (diff)
downloadkernel-021d9c107e29a598e51fb66a54b22e5416125408.tar.gz
kernel-021d9c107e29a598e51fb66a54b22e5416125408.zip
xfs: remove xfs_validate_rtextents
Replace xfs_validate_rtextents with an open coded check for 0 rtextents. The name for the function implies it does a lot more than a zero check, which is more obvious when open coded. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-rw-r--r--fs/xfs/xfs_rtalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index ebeab8e4dab1..d28395abdd02 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -903,7 +903,7 @@ xfs_growfs_rt(
*/
nrextents = nrblocks;
do_div(nrextents, in->extsize);
- if (!xfs_validate_rtextents(nrextents)) {
+ if (nrextents == 0) {
error = -EINVAL;
goto out_unlock;
}