]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: split xfs_mod_freecounter
authorChristoph Hellwig <hch@lst.de>
Mon, 29 Jul 2024 23:22:41 +0000 (16:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:01 +0000 (17:01 -0700)
commitde959abb00d9479172aa500721ba6c43c5e4cb9b
treee76337021c87a7b31915dadff0b03b4bf123a5e3
parent28a151b9d2da4bc29d1cee935fcd04fa5b1befed
xfs: split xfs_mod_freecounter

Source kernel commit: f30f656e25eb72c4309e76b16fa45062e183a2ee

xfs_mod_freecounter has two entirely separate code paths for adding or
subtracting from the free counters.  Only the subtract case looks at the
rsvd flag and can return an error.

Split xfs_mod_freecounter into separate helpers for subtracting or
adding the freecounter, and remove all the impossible to reach error
handling for the addition case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
libxfs/libxfs_priv.h
libxfs/xfs_ag.c
libxfs/xfs_ag_resv.c
libxfs/xfs_ag_resv.h
libxfs/xfs_alloc.c
libxfs/xfs_bmap.c