summaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_file.c
diff options
context:
space:
mode:
authorLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-12-22 07:50:56 +0100
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-12-22 07:50:56 +0100
commitd415867e0abc35e3b2f0d4196e98c339d6fe29a2 (patch)
treeb47b85fb268449e8f4afb619c82e43e51ed261e9 /fs/xfs/linux-2.6/xfs_file.c
parent[XFS] Fix merge conflict in fs/xfs/xfs_rename.c (diff)
downloadlinux-d415867e0abc35e3b2f0d4196e98c339d6fe29a2.tar.xz
linux-d415867e0abc35e3b2f0d4196e98c339d6fe29a2.zip
[XFS] Use the incore inode size in xfs_file_readdir()
We should be using the incore inode size here not the linux inode size. The incore inode size is always up to date for directories whereas the linux inode size is not updated for directories. We've hit assertions in xfs_bmap() and traced it back to the linux inode size being zero but the incore size being correct. Reviewed-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_file.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
index a0c45cc8a6b8..e14c4e3aea0c 100644
--- a/fs/xfs/linux-2.6/xfs_file.c
+++ b/fs/xfs/linux-2.6/xfs_file.c
@@ -204,7 +204,7 @@ xfs_file_readdir(
* point we can change the ->readdir prototype to include the
* buffer size.
*/
- bufsize = (size_t)min_t(loff_t, PAGE_SIZE, inode->i_size);
+ bufsize = (size_t)min_t(loff_t, PAGE_SIZE, ip->i_d.di_size);
error = xfs_readdir(ip, dirent, bufsize,
(xfs_off_t *)&filp->f_pos, filldir);