From 901deb8e9ee23b46563e01bca44e7616813d610d Mon Sep 17 00:00:00 2001 From: Tao Ma Date: Thu, 10 Sep 2009 15:28:47 +0800 Subject: [PATCH] --- yaml --- r: 165144 b: refs/heads/master c: b80474b432913f73cce8db001e9fa3104f9b79ee h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/aops.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index c4a6786dca12..2c1e0c078b57 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 83e32d9044a4510fffdf65c2691a25c0ba84e259 +refs/heads/master: b80474b432913f73cce8db001e9fa3104f9b79ee diff --git a/trunk/fs/ocfs2/aops.c b/trunk/fs/ocfs2/aops.c index 33e03c551127..72e76062a900 100644 --- a/trunk/fs/ocfs2/aops.c +++ b/trunk/fs/ocfs2/aops.c @@ -690,6 +690,10 @@ static ssize_t ocfs2_direct_IO(int rw, if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) return 0; + /* Fallback to buffered I/O if we are appending. */ + if (i_size_read(inode) <= offset) + return 0; + ret = blockdev_direct_IO_no_locking(rw, iocb, inode, inode->i_sb->s_bdev, iov, offset, nr_segs,