diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2011-03-09 10:58:04 +0000 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2011-03-09 10:58:04 +0000 |
commit | fc0e38dae645f65424d1fb5d2a938aab8ce48a58 (patch) | |
tree | 8b0a89a0de01a0504a002a184a290a53545fce82 /fs/gfs2/glock.h | |
parent | 662e3a551b468c7338f5291d7a00389fe85885e2 (diff) | |
download | op-kernel-dev-fc0e38dae645f65424d1fb5d2a938aab8ce48a58.zip op-kernel-dev-fc0e38dae645f65424d1fb5d2a938aab8ce48a58.tar.gz |
GFS2: Fix glock deallocation race
This patch fixes a race in deallocating glocks which was introduced
in the RCU glock patch. We need to ensure that the glock count is
kept correct even in the case that there is a race to add a new
glock into the hash table. Also, to avoid having to wait for an
RCU grace period, the glock counter can be decremented before
call_rcu() is called.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/glock.h')
-rw-r--r-- | fs/gfs2/glock.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h index afa8bfe..aea1606 100644 --- a/fs/gfs2/glock.h +++ b/fs/gfs2/glock.h @@ -230,7 +230,7 @@ extern void gfs2_gl_hash_clear(struct gfs2_sbd *sdp); extern void gfs2_glock_finish_truncate(struct gfs2_inode *ip); extern void gfs2_glock_thaw(struct gfs2_sbd *sdp); extern void gfs2_glock_schedule_for_reclaim(struct gfs2_glock *gl); -extern void gfs2_glock_free(struct rcu_head *rcu); +extern void gfs2_glock_free(struct gfs2_glock *gl); extern int __init gfs2_glock_init(void); extern void gfs2_glock_exit(void); |