]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: move privileged user check to gfs2_quota_lock_check
authorBob Peterson <rpeterso@redhat.com>
Tue, 5 May 2020 16:53:21 +0000 (11:53 -0500)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 8 May 2020 16:47:58 +0000 (18:47 +0200)
commitcf2db9931b20db9ac82b3162080e6c996802848f
tree7a9ea7fad5138fa93377f285bc3b44f872fb833a
parent2f0486d470f9db5abf75ed6bce2b9d960d964d88
gfs2: move privileged user check to gfs2_quota_lock_check

Before this patch, function gfs2_quota_lock checked if it was called
from a privileged user, and if so, it bypassed the quota check:
superuser can operate outside the quotas.
That's the wrong place for the check because the lock/unlock functions
are separate from the lock_check function, and you can do lock and
unlock without actually checking the quotas.

This patch moves the check to gfs2_quota_lock_check.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/quota.c
fs/gfs2/quota.h