diff options
Diffstat (limited to 'fs/gfs2/ops_super.c')
-rw-r--r-- | fs/gfs2/ops_super.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c index 9c7678db08fb..2cb744ba3b77 100644 --- a/fs/gfs2/ops_super.c +++ b/fs/gfs2/ops_super.c | |||
@@ -493,7 +493,7 @@ static void gfs2_delete_inode(struct inode *inode) | |||
493 | gfs2_holder_reinit(LM_ST_EXCLUSIVE, LM_FLAG_TRY_1CB | GL_NOCACHE, &ip->i_iopen_gh); | 493 | gfs2_holder_reinit(LM_ST_EXCLUSIVE, LM_FLAG_TRY_1CB | GL_NOCACHE, &ip->i_iopen_gh); |
494 | error = gfs2_glock_nq(&ip->i_iopen_gh); | 494 | error = gfs2_glock_nq(&ip->i_iopen_gh); |
495 | if (error) | 495 | if (error) |
496 | goto out_uninit; | 496 | goto out_truncate; |
497 | 497 | ||
498 | if (S_ISDIR(inode->i_mode) && | 498 | if (S_ISDIR(inode->i_mode) && |
499 | (ip->i_di.di_flags & GFS2_DIF_EXHASH)) { | 499 | (ip->i_di.di_flags & GFS2_DIF_EXHASH)) { |
@@ -518,6 +518,7 @@ static void gfs2_delete_inode(struct inode *inode) | |||
518 | if (error) | 518 | if (error) |
519 | goto out_unlock; | 519 | goto out_unlock; |
520 | 520 | ||
521 | out_truncate: | ||
521 | error = gfs2_trans_begin(sdp, 0, sdp->sd_jdesc->jd_blocks); | 522 | error = gfs2_trans_begin(sdp, 0, sdp->sd_jdesc->jd_blocks); |
522 | if (error) | 523 | if (error) |
523 | goto out_unlock; | 524 | goto out_unlock; |
@@ -526,8 +527,8 @@ static void gfs2_delete_inode(struct inode *inode) | |||
526 | gfs2_trans_end(sdp); | 527 | gfs2_trans_end(sdp); |
527 | 528 | ||
528 | out_unlock: | 529 | out_unlock: |
529 | gfs2_glock_dq(&ip->i_iopen_gh); | 530 | if (test_bit(HIF_HOLDER, &ip->i_iopen_gh.gh_iflags)) |
530 | out_uninit: | 531 | gfs2_glock_dq(&ip->i_iopen_gh); |
531 | gfs2_holder_uninit(&ip->i_iopen_gh); | 532 | gfs2_holder_uninit(&ip->i_iopen_gh); |
532 | gfs2_glock_dq_uninit(&gh); | 533 | gfs2_glock_dq_uninit(&gh); |
533 | if (error && error != GLR_TRYFAILED) | 534 | if (error && error != GLR_TRYFAILED) |