Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e7ff6aed8761b2c86cd9ab7083e512de2b8cfa48
Commit:     e7ff6aed8761b2c86cd9ab7083e512de2b8cfa48
Parent:     6be145bfb1ce93b2dbb854fee66fbb8d04916339
Author:     David Chinner <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 10 18:37:46 2007 +1100
Committer:  Tim Shimmin <[EMAIL PROTECTED]>
CommitDate: Sat Feb 10 18:37:46 2007 +1100

    [XFS] Don't use kmap in xfs_iozero.
    
    kmap() is inefficient and does not scale well. kmap_atomic() is a better
    choice. Use the generic wrapper function instead of open coding the
    kmap-memset-dcache flush-kunmap stuff.
    
    SGI-PV: 960904
    SGI-Modid: xfs-linux-melb:xfs-kern:28041a
    
    Signed-off-by: David Chinner <[EMAIL PROTECTED]>
    Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]>
    Signed-off-by: Tim Shimmin <[EMAIL PROTECTED]>
---
 fs/xfs/linux-2.6/xfs_lrw.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c
index 0b5c9b6..ff8d64e 100644
--- a/fs/xfs/linux-2.6/xfs_lrw.c
+++ b/fs/xfs/linux-2.6/xfs_lrw.c
@@ -137,7 +137,6 @@ xfs_iozero(
        unsigned                bytes;
        struct page             *page;
        struct address_space    *mapping;
-       char                    *kaddr;
        int                     status;
 
        mapping = ip->i_mapping;
@@ -155,15 +154,13 @@ xfs_iozero(
                if (!page)
                        break;
 
-               kaddr = kmap(page);
                status = mapping->a_ops->prepare_write(NULL, page, offset,
                                                        offset + bytes);
-               if (status) {
+               if (status)
                        goto unlock;
-               }
 
-               memset((void *) (kaddr + offset), 0, bytes);
-               flush_dcache_page(page);
+               memclear_highpage_flush(page, offset, bytes);
+
                status = mapping->a_ops->commit_write(NULL, page, offset,
                                                        offset + bytes);
                if (!status) {
@@ -172,7 +169,6 @@ xfs_iozero(
                }
 
 unlock:
-               kunmap(page);
                unlock_page(page);
                page_cache_release(page);
                if (status)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to