aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/glops.c')
-rw-r--r--fs/gfs2/glops.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index 68ee66552d19..8ebff8ebae20 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -227,6 +227,7 @@ static int inode_go_demote_ok(struct gfs2_glock *gl)
227static int inode_go_lock(struct gfs2_holder *gh) 227static int inode_go_lock(struct gfs2_holder *gh)
228{ 228{
229 struct gfs2_glock *gl = gh->gh_gl; 229 struct gfs2_glock *gl = gh->gh_gl;
230 struct gfs2_sbd *sdp = gl->gl_sbd;
230 struct gfs2_inode *ip = gl->gl_object; 231 struct gfs2_inode *ip = gl->gl_object;
231 int error = 0; 232 int error = 0;
232 233
@@ -241,8 +242,14 @@ static int inode_go_lock(struct gfs2_holder *gh)
241 242
242 if ((ip->i_diskflags & GFS2_DIF_TRUNC_IN_PROG) && 243 if ((ip->i_diskflags & GFS2_DIF_TRUNC_IN_PROG) &&
243 (gl->gl_state == LM_ST_EXCLUSIVE) && 244 (gl->gl_state == LM_ST_EXCLUSIVE) &&
244 (gh->gh_state == LM_ST_EXCLUSIVE)) 245 (gh->gh_state == LM_ST_EXCLUSIVE)) {
245 error = gfs2_truncatei_resume(ip); 246 spin_lock(&sdp->sd_trunc_lock);
247 if (list_empty(&ip->i_trunc_list))
248 list_add(&sdp->sd_trunc_list, &ip->i_trunc_list);
249 spin_unlock(&sdp->sd_trunc_lock);
250 wake_up(&sdp->sd_quota_wait);
251 return 1;
252 }
246 253
247 return error; 254 return error;
248} 255}