diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2013-10-04 12:29:34 +0100 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2013-10-04 12:29:34 +0100 |
commit | e46c772dbafc2059b0c7ee87c6a7232baadaf6c7 (patch) | |
tree | 43e33f6a25ba196b9391e5f03e137a46455a0807 /fs/gfs2/ops_fstype.c | |
parent | aabd7c72f52145fcf13f9251770b0b0246b5e406 (diff) |
GFS2: Protect quota sync generation
Now that gfs2_quota_sync can be potentially called from multiple
threads, we should protect this bit of code, and the sync generation
number in particular in order to ensure that there are no races
when syncing quotas.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Abhijith Das <adas@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_fstype.c')
-rw-r--r-- | fs/gfs2/ops_fstype.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 8e40fda985d6..82303b474958 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -93,6 +93,7 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb) INIT_LIST_HEAD(&sdp->sd_quota_list); mutex_init(&sdp->sd_quota_mutex); + mutex_init(&sdp->sd_quota_sync_mutex); init_waitqueue_head(&sdp->sd_quota_wait); INIT_LIST_HEAD(&sdp->sd_trunc_list); spin_lock_init(&sdp->sd_trunc_lock); |