]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_quota: don't stop the directory tree walk when DEPTH is hit
authorKazuya Mio <k-mio@sx.jp.nec.com>
Wed, 1 Aug 2018 22:06:44 +0000 (17:06 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 1 Aug 2018 22:06:44 +0000 (17:06 -0500)
commit1472d00f03fad554616321436d1a9c4bdaff9714
tree411b81b3708f11333b045e56eaa15ac8dc81e41c
parent0d88afd64e2e60f11de6d94dafaec2898d0b1680
xfs_quota: don't stop the directory tree walk when DEPTH is hit

To set/check/clear a project quota, xfs_quota performs a pre-order tree
traversal by using nftw(3).  The documentation states that the -d option
can be used to skip subtrees below a certain level in the directory
hierarchy.  Unfortunately, {check,setup,clear}_project returns -1 when
DEPTH is hit, which stops the directory tree walk immediately.  We only
wanted to skip the subtree, so return 0 instead.

Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
quota/project.c