diff options
-rw-r--r-- | fs/ocfs2/aops.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 0c2848a599c9..2a618dd2577d 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -706,7 +706,7 @@ static ssize_t ocfs2_direct_IO_write(struct kiocb *iocb, | |||
706 | } | 706 | } |
707 | 707 | ||
708 | if (append_write) { | 708 | if (append_write) { |
709 | ret = ocfs2_inode_lock(inode, &di_bh, 1); | 709 | ret = ocfs2_inode_lock(inode, NULL, 1); |
710 | if (ret < 0) { | 710 | if (ret < 0) { |
711 | mlog_errno(ret); | 711 | mlog_errno(ret); |
712 | goto clean_orphan; | 712 | goto clean_orphan; |
@@ -720,7 +720,6 @@ static ssize_t ocfs2_direct_IO_write(struct kiocb *iocb, | |||
720 | if (ret < 0) { | 720 | if (ret < 0) { |
721 | mlog_errno(ret); | 721 | mlog_errno(ret); |
722 | ocfs2_inode_unlock(inode, 1); | 722 | ocfs2_inode_unlock(inode, 1); |
723 | brelse(di_bh); | ||
724 | goto clean_orphan; | 723 | goto clean_orphan; |
725 | } | 724 | } |
726 | 725 | ||
@@ -728,13 +727,10 @@ static ssize_t ocfs2_direct_IO_write(struct kiocb *iocb, | |||
728 | if (is_overwrite < 0) { | 727 | if (is_overwrite < 0) { |
729 | mlog_errno(is_overwrite); | 728 | mlog_errno(is_overwrite); |
730 | ocfs2_inode_unlock(inode, 1); | 729 | ocfs2_inode_unlock(inode, 1); |
731 | brelse(di_bh); | ||
732 | goto clean_orphan; | 730 | goto clean_orphan; |
733 | } | 731 | } |
734 | 732 | ||
735 | ocfs2_inode_unlock(inode, 1); | 733 | ocfs2_inode_unlock(inode, 1); |
736 | brelse(di_bh); | ||
737 | di_bh = NULL; | ||
738 | } | 734 | } |
739 | 735 | ||
740 | written = __blockdev_direct_IO(WRITE, iocb, inode, inode->i_sb->s_bdev, | 736 | written = __blockdev_direct_IO(WRITE, iocb, inode, inode->i_sb->s_bdev, |