]> git.ipfire.org Git - people/ms/linux.git/blobdiff - fs/gfs2/glops.c
gfs2: Revert 'Fix "truncate in progress" hang'
[people/ms/linux.git] / fs / gfs2 / glops.c
index 6bc09661065418d8594c9e8cd81c862332f6bc48..c387f80ca65e8f48da1b8e86f1e8947561f9f8f3 100644 (file)
@@ -488,7 +488,6 @@ int gfs2_inode_refresh(struct gfs2_inode *ip)
 static int inode_go_instantiate(struct gfs2_holder *gh)
 {
        struct gfs2_glock *gl = gh->gh_gl;
-       struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
        struct gfs2_inode *ip = gl->gl_object;
        int error = 0;
 
@@ -504,14 +503,8 @@ static int inode_go_instantiate(struct gfs2_holder *gh)
 
        if ((ip->i_diskflags & GFS2_DIF_TRUNC_IN_PROG) &&
            (gl->gl_state == LM_ST_EXCLUSIVE) &&
-           (gh->gh_state == LM_ST_EXCLUSIVE)) {
-               spin_lock(&sdp->sd_trunc_lock);
-               if (list_empty(&ip->i_trunc_list))
-                       list_add(&ip->i_trunc_list, &sdp->sd_trunc_list);
-               spin_unlock(&sdp->sd_trunc_lock);
-               wake_up(&sdp->sd_quota_wait);
-               gfs2_wait_truncate(ip);
-       }
+           (gh->gh_state == LM_ST_EXCLUSIVE))
+               error = gfs2_truncatei_resume(ip);
 
 out:
        return error;