diff options
author | Tim Shimmin <tes@sgi.com> | 2007-11-23 00:30:42 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-07 02:17:58 -0500 |
commit | e6a4b37f38dca6e86b2648d172946700ee921e12 (patch) | |
tree | a094d91f8b864a33735a54c12a792bb084f7c5be /fs/xfs/linux-2.6/xfs_lrw.c | |
parent | f7b7c3673e6e225de337abe00e14dc048e44782b (diff) |
[XFS] Remove the BPCSHIFT and NB* based macros from XFS.
The BPCSHIFT based macros, btoc*, ctob*, offtoc* and ctooff are either not
used or don't need to be used. The NDPP, NDPP, NBBY macros don't need to
be used but instead are replaced directly by PAGE_SIZE and PAGE_CACHE_SIZE
where appropriate. Initial patch and motivation from Nicolas Kaiser.
SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30096a
Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
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; |