diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_lrw.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_lrw.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index 19a1f077dbd6..6c3a846a5267 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c | |||
@@ -243,9 +243,8 @@ xfs_read( | |||
243 | 243 | ||
244 | if (unlikely(ioflags & IO_ISDIRECT)) { | 244 | if (unlikely(ioflags & IO_ISDIRECT)) { |
245 | if (VN_CACHED(vp)) | 245 | if (VN_CACHED(vp)) |
246 | ret = xfs_flushinval_pages(ip, | 246 | ret = xfs_flushinval_pages(ip, (*offset & PAGE_CACHE_MASK), |
247 | ctooff(offtoct(*offset)), | 247 | -1, FI_REMAPF_LOCKED); |
248 | -1, FI_REMAPF_LOCKED); | ||
249 | mutex_unlock(&inode->i_mutex); | 248 | mutex_unlock(&inode->i_mutex); |
250 | if (ret) { | 249 | if (ret) { |
251 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); | 250 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); |
@@ -731,9 +730,9 @@ retry: | |||
731 | if (VN_CACHED(vp)) { | 730 | if (VN_CACHED(vp)) { |
732 | WARN_ON(need_i_mutex == 0); | 731 | WARN_ON(need_i_mutex == 0); |
733 | xfs_inval_cached_trace(xip, pos, -1, | 732 | xfs_inval_cached_trace(xip, pos, -1, |
734 | ctooff(offtoct(pos)), -1); | 733 | (pos & PAGE_CACHE_MASK), -1); |
735 | error = xfs_flushinval_pages(xip, | 734 | error = xfs_flushinval_pages(xip, |
736 | ctooff(offtoct(pos)), | 735 | (pos & PAGE_CACHE_MASK), |
737 | -1, FI_REMAPF_LOCKED); | 736 | -1, FI_REMAPF_LOCKED); |
738 | if (error) | 737 | if (error) |
739 | goto out_unlock_internal; | 738 | goto out_unlock_internal; |