]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/linux-2.6/xfs_lrw.c
Merge branch 'linux-2.6'
[linux-2.6-omap-h63xx.git] / fs / xfs / linux-2.6 / xfs_lrw.c
index 19a1f077dbd6fbd3bc2725241f691bd8dc576ea2..1663533884902bb749a371271e7e4943f507a3f7 100644 (file)
@@ -152,7 +152,7 @@ xfs_iozero(
                if (status)
                        break;
 
-               zero_user_page(page, offset, bytes, KM_USER0);
+               zero_user(page, offset, bytes);
 
                status = pagecache_write_end(NULL, mapping, pos, bytes, bytes,
                                        page, fsdata);
@@ -243,9 +243,8 @@ xfs_read(
 
        if (unlikely(ioflags & IO_ISDIRECT)) {
                if (VN_CACHED(vp))
-                       ret = xfs_flushinval_pages(ip,
-                                       ctooff(offtoct(*offset)),
-                                       -1, FI_REMAPF_LOCKED);
+                       ret = xfs_flushinval_pages(ip, (*offset & PAGE_CACHE_MASK),
+                                                   -1, FI_REMAPF_LOCKED);
                mutex_unlock(&inode->i_mutex);
                if (ret) {
                        xfs_iunlock(ip, XFS_IOLOCK_SHARED);
@@ -731,9 +730,9 @@ retry:
                if (VN_CACHED(vp)) {
                        WARN_ON(need_i_mutex == 0);
                        xfs_inval_cached_trace(xip, pos, -1,
-                                       ctooff(offtoct(pos)), -1);
+                                       (pos & PAGE_CACHE_MASK), -1);
                        error = xfs_flushinval_pages(xip,
-                                       ctooff(offtoct(pos)),
+                                       (pos & PAGE_CACHE_MASK),
                                        -1, FI_REMAPF_LOCKED);
                        if (error)
                                goto out_unlock_internal;