While we don't allow setting quotas on the global
filesystem root, the inode which is root from the
client mount's point of view might have a quota.
Signed-off-by: John Spray <john.spray@redhat.com>
if (!cct->_conf->client_quota)
return false;
- while (in != root_ancestor) {
+ while (true) {
assert(in != NULL);
if (test(*in)) {
return true;
}
- in = get_quota_root(in);
+ if (in == root_ancestor) {
+ // We're done traversing, drop out
+ return false;
+ } else {
+ // Continue up the tree
+ in = get_quota_root(in);
+ }
}
return false;