]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: refactor quota check functions
authorJohn Spray <john.spray@redhat.com>
Fri, 25 Sep 2015 12:02:56 +0000 (13:02 +0100)
committerJohn Spray <john.spray@redhat.com>
Fri, 25 Sep 2015 12:24:00 +0000 (13:24 +0100)
commit15e19a4a623ed3a37b8ee43c039e4cc106489ac9
tree16a76355ed1d2e7bf05358fb057c5559e37205b9
parent6f11b82f3007819b58f143ad4b4911c4fb766ab9
client: refactor quota check functions

Generalise the path traversal into check_quota_condition
and then call that from each of file_exceeded, bytes_exceeded,
bytes_approaching with the appropriate lambda function.

Motivated by fixing the path traversal and wanting to
only fix it in one place.

Signed-off-by: John Spray <john.spray@redhat.com>
src/client/Client.cc
src/client/Client.h