diff options
Diffstat (limited to 'fs/ocfs2/aops.c')
-rw-r--r-- | fs/ocfs2/aops.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index b74971e19d54..56963e6c46c0 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -522,12 +522,17 @@ static void ocfs2_dio_end_io(struct kiocb *iocb, | |||
522 | void *private) | 522 | void *private) |
523 | { | 523 | { |
524 | struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode; | 524 | struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode; |
525 | int level; | ||
525 | 526 | ||
526 | /* this io's submitter should not have unlocked this before we could */ | 527 | /* this io's submitter should not have unlocked this before we could */ |
527 | BUG_ON(!ocfs2_iocb_is_rw_locked(iocb)); | 528 | BUG_ON(!ocfs2_iocb_is_rw_locked(iocb)); |
529 | |||
528 | ocfs2_iocb_clear_rw_locked(iocb); | 530 | ocfs2_iocb_clear_rw_locked(iocb); |
529 | up_read(&inode->i_alloc_sem); | 531 | |
530 | ocfs2_rw_unlock(inode, 0); | 532 | level = ocfs2_iocb_rw_locked_level(iocb); |
533 | if (!level) | ||
534 | up_read(&inode->i_alloc_sem); | ||
535 | ocfs2_rw_unlock(inode, level); | ||
531 | } | 536 | } |
532 | 537 | ||
533 | /* | 538 | /* |