diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2017-06-30 08:55:08 -0400 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2017-07-05 08:20:52 -0400 |
commit | 6f6597baae206c544c49ad7f1129d5adc1e9019d (patch) | |
tree | 3bcfcb1ebf6713cdd95f4146012c236e3d6f5fbf /fs/gfs2/dir.c | |
parent | 4fd1a5795214bc6405f14691c1344ae8c3f17215 (diff) |
gfs2: Protect gl->gl_object by spin lock
Put all remaining accesses to gl->gl_object under the
gl->gl_lockref.lock spinlock to prevent races.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r-- | fs/gfs2/dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 96a7487b09b6..db427658ccd9 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c | |||
@@ -2032,8 +2032,8 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len, | |||
2032 | gfs2_rlist_alloc(&rlist, LM_ST_EXCLUSIVE); | 2032 | gfs2_rlist_alloc(&rlist, LM_ST_EXCLUSIVE); |
2033 | 2033 | ||
2034 | for (x = 0; x < rlist.rl_rgrps; x++) { | 2034 | for (x = 0; x < rlist.rl_rgrps; x++) { |
2035 | struct gfs2_rgrpd *rgd; | 2035 | struct gfs2_rgrpd *rgd = gfs2_glock2rgrp(rlist.rl_ghs[x].gh_gl); |
2036 | rgd = rlist.rl_ghs[x].gh_gl->gl_object; | 2036 | |
2037 | rg_blocks += rgd->rd_length; | 2037 | rg_blocks += rgd->rd_length; |
2038 | } | 2038 | } |
2039 | 2039 | ||