]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs: simplify usage of the rcur local variable in xfs_refcount_finish_one
authorDarrick J. Wong <djwong@kernel.org>
Wed, 2 Oct 2024 01:22:24 +0000 (18:22 -0700)
committerAndrey Albershteyn <aalbersh@redhat.com>
Fri, 4 Oct 2024 10:42:07 +0000 (12:42 +0200)
commit21f95f3ac61f764a57a75c61cf6a34301cfc9212
tree8e2bebb65ec1b319eab1b1ab2a364f097fcd2ce8
parenta344868860be20633e27c1a8d0034bd6ab935330
xfs: simplify usage of the rcur local variable in xfs_refcount_finish_one

Source kernel commit: e51987a12cb57ca3702bff5df8a615037b2c8f8a

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>
libxfs/xfs_refcount.c