]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: simplify usage of the rcur local variable in xfs_refcount_finish_one
authorDarrick J. Wong <djwong@kernel.org>
Tue, 2 Jul 2024 18:23:11 +0000 (11:23 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 2 Jul 2024 18:37:07 +0000 (11:37 -0700)
commite51987a12cb57ca3702bff5df8a615037b2c8f8a
treed6c7bd346efe0ee5ffd07bf065224c93820ad797
parentbac3f784925299b5e69a857e7e03e59c88aa14be
xfs: simplify usage of the rcur local variable in xfs_refcount_finish_one

Only update rcur when we know the final *pcur value.

Inspired-by: Christoph Hellwig <hch@lst.de>
[djwong: don't leave the caller with a dangling ref]
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_refcount.c