diff options
author | Abhi Das <adas@redhat.com> | 2015-04-08 16:03:56 +0200 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2015-04-08 16:31:18 +0200 |
commit | 30133177957dca9a3e2a37b720f891d3225a92a1 (patch) | |
tree | 67c0d0b540759a64ab10d84a222e5ef6a2c6671d /drivers/pinctrl/nomadik/pinctrl-abx500.h | |
parent | gfs2: incorrect check for debugfs returns (diff) | |
download | linux-30133177957dca9a3e2a37b720f891d3225a92a1.tar.xz linux-30133177957dca9a3e2a37b720f891d3225a92a1.zip |
gfs2: fix quota refresh race in do_glock()
quotad periodically syncs in-memory quotas to the ondisk quota file
and sets the QDF_REFRESH flag so that a subsequent read of a synced
quota is re-read from disk.
gfs2_quota_lock() checks for this flag and sets a 'force' bit to
force re-read from disk if requested. However, there is a race
condition here. It is possible for gfs2_quota_lock() to find the
QDF_REFRESH flag unset (i.e force=0) and quotad comes in immediately
after and syncs the relevant quota and sets the QDF_REFRESH flag.
gfs2_quota_lock() resumes with force=0 and uses the stale in-memory
quota usage values that result in miscalculations.
This patch fixes this race by moving the check for the QDF_REFRESH
flag check further out into the gfs2_quota_lock() process, i.e, in
do_glock(), under the protection of the quota glock.
Signed-off-by: Abhi Das <adas@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'drivers/pinctrl/nomadik/pinctrl-abx500.h')
0 files changed, 0 insertions, 0 deletions