From a20753ac571e47a7690c0c5c069d19b5fba4bc5d Mon Sep 17 00:00:00 2001 From: Lachlan McIlroy Date: Wed, 17 Sep 2008 16:50:14 +1000 Subject: [PATCH] --- yaml --- r: 109899 b: refs/heads/master c: 364f358a734ddcd827c662ccbfa58ee3ac510762 h: refs/heads/master i: 109897: 54c5f3850053f9090f65efdd29225da43d1ce224 109895: 049ffed9a01505d64ed9f6eed0766040546c3f8c v: v3 --- [refs] | 2 +- trunk/fs/xfs/linux-2.6/xfs_aops.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 351ff2222e52..e2a78f99cf5a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6efdf281777eb07fac28ac2b2d7df1e619ee6da1 +refs/heads/master: 364f358a734ddcd827c662ccbfa58ee3ac510762 diff --git a/trunk/fs/xfs/linux-2.6/xfs_aops.c b/trunk/fs/xfs/linux-2.6/xfs_aops.c index f42f80a3b1fa..a44d68eb50b5 100644 --- a/trunk/fs/xfs/linux-2.6/xfs_aops.c +++ b/trunk/fs/xfs/linux-2.6/xfs_aops.c @@ -1338,6 +1338,10 @@ __xfs_get_blocks( offset = (xfs_off_t)iblock << inode->i_blkbits; ASSERT(bh_result->b_size >= (1 << inode->i_blkbits)); size = bh_result->b_size; + + if (!create && direct && offset >= i_size_read(inode)) + return 0; + error = xfs_iomap(XFS_I(inode), offset, size, create ? flags : BMAPI_READ, &iomap, &niomap); if (error)