aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJoseph Qi <joseph.qi@huawei.com>2015-04-14 18:43:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 19:48:57 -0400
commit7e9b19551c8249baf380cbd274633ee4af95bc99 (patch)
treef6db9b069eb265aabab06c16f40dd436b0ff82c1 /fs
parentbdd86215b393b743be34b854299c6cda7cbb361c (diff)
ocfs2: no need get dinode bh when zeroing extend
Since di_bh won't be used when zeroing extend, set it to NULL. Signed-off-by: Joseph Qi <joseph.qi@huawei.com> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/aops.c6
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,