projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branches 'x86/alternatives', 'x86/cleanups', 'x86/commandline', 'x86/crashdump...
[cascardo/linux.git]
/
fs
/
xfs
/
linux-2.6
/
xfs_aops.c
diff --git
a/fs/xfs/linux-2.6/xfs_aops.c
b/fs/xfs/linux-2.6/xfs_aops.c
index
f42f80a
..
a44d68e
100644
(file)
--- a/
fs/xfs/linux-2.6/xfs_aops.c
+++ b/
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;
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)
error = xfs_iomap(XFS_I(inode), offset, size,
create ? flags : BMAPI_READ, &iomap, &niomap);
if (error)