diff options
author | Bob Peterson <rpeterso@redhat.com> | 2016-07-06 17:36:43 +0200 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2016-07-12 18:48:22 +0200 |
commit | 44f52122a22004de9c3bae288bbc6dff3624fe9c (patch) | |
tree | df0c36e3d387d2cd46b74c0f1228bc3da6fcad4e /fs/gfs2/lops.c | |
parent | gfs2: writeout truncated pages (diff) | |
download | linux-44f52122a22004de9c3bae288bbc6dff3624fe9c.tar.xz linux-44f52122a22004de9c3bae288bbc6dff3624fe9c.zip |
GFS2: Check rs_free with rd_rsspin protection
For the last process to close a file opened for write, function
gfs2_rsqa_delete was deleting the file's inode's block reservation
out of the rgrp reservations tree. Then it was checking to make sure
rs_free was 0, but it was performing the check outside the protection
of rd_rsspin spin_lock. The rd_rsspin spin_lock protection is needed
to prevent a race between the process freeing the reservation and
another who is allocating a new set of blocks inside the same rgrp
for the same inode, thus changing its value.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/lops.c')
0 files changed, 0 insertions, 0 deletions