diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/aops.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 33e03c551127..72e76062a900 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -690,6 +690,10 @@ static ssize_t ocfs2_direct_IO(int rw, | |||
690 | if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) | 690 | if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) |
691 | return 0; | 691 | return 0; |
692 | 692 | ||
693 | /* Fallback to buffered I/O if we are appending. */ | ||
694 | if (i_size_read(inode) <= offset) | ||
695 | return 0; | ||
696 | |||
693 | ret = blockdev_direct_IO_no_locking(rw, iocb, inode, | 697 | ret = blockdev_direct_IO_no_locking(rw, iocb, inode, |
694 | inode->i_sb->s_bdev, iov, offset, | 698 | inode->i_sb->s_bdev, iov, offset, |
695 | nr_segs, | 699 | nr_segs, |