]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs_scrub: fix nr_dirs accounting problems
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 26 Sep 2019 17:45:56 +0000 (13:45 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 26 Sep 2019 17:45:56 +0000 (13:45 -0400)
commit4953e7098af1e15dc554271e91b2e4491f4e22cc
tree42a8f88a9d465d50357b3c1097f8a7c6ee4160bc
parent83630b7ff9910501230c4154d52b6bc69112dc4a
xfs_scrub: fix nr_dirs accounting problems

When we're scanning the directory tree, we bump nr_dirs every time we
think we're going to queue a new directory to process, and we decrement
it every time we're finished doing something with a directory
(successful or not).  We forgot to undo a counter increment when
workqueue_add fails, so refactor the code into helpers and call them
as necessary for correct operation.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
scrub/vfs.c