]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Make ->readpages palatable to NFS
authorTrond Myklebust <trond.myklebust@fys.uio.no>
Tue, 5 Nov 2002 12:49:27 +0000 (04:49 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 5 Nov 2002 12:49:27 +0000 (04:49 -0800)
The following patch makes the ->readpages() address_space_operation
take a struct file argument just like ->readpage().

fs/ext2/inode.c
fs/ext3/inode.c
fs/jfs/inode.c
fs/xfs/linux/xfs_aops.c
include/linux/fs.h
mm/readahead.c

index b920d19cf8bafba347b01fae4b6106ce41fbdbaf..36299aeacb29af83321b0edf24c0fe46dacc2061 100644 (file)
@@ -599,7 +599,7 @@ static int ext2_readpage(struct file *file, struct page *page)
 }
 
 static int
-ext2_readpages(struct address_space *mapping,
+ext2_readpages(struct file *file, struct address_space *mapping,
                struct list_head *pages, unsigned nr_pages)
 {
        return mpage_readpages(mapping, pages, nr_pages, ext2_get_block);
index c4fe6643a368de191162605fdbdb8e5ab0142717..2f108f88403054be3ab054c7b85eac7b62fcad32 100644 (file)
@@ -1385,7 +1385,7 @@ static int ext3_readpage(struct file *file, struct page *page)
 }
 
 static int
-ext3_readpages(struct address_space *mapping,
+ext3_readpages(struct file *file, struct address_space *mapping,
                struct list_head *pages, unsigned nr_pages)
 {
        return mpage_readpages(mapping, pages, nr_pages, ext3_get_block);
index fe9560e59e87b2f304887415a42f21da598a7f67..91d4f5cf2182ba3cf7e7a9c4a8eb34ad389b4f16 100644 (file)
@@ -293,7 +293,7 @@ static int jfs_readpage(struct file *file, struct page *page)
        return mpage_readpage(page, jfs_get_block);
 }
 
-static int jfs_readpages(struct address_space *mapping,
+static int jfs_readpages(struct file *file, struct address_space *mapping,
                struct list_head *pages, unsigned nr_pages)
 {
        return mpage_readpages(mapping, pages, nr_pages, jfs_get_block);
index e4ecd6729214c3b903ebcee7368660e3c68c73b6..ae03f46448d0a98f185b614dbc26fb15e7475e2a 100644 (file)
@@ -644,6 +644,7 @@ linvfs_readpage(
 
 STATIC int
 linvfs_readpages(
+       struct file             *unused,
        struct address_space    *mapping,
        struct list_head        *pages,
        unsigned                nr_pages)
index c100c6297103d4bce3749cdd45bd79d465302d38..4e0e4bd005a66e0ae9a89f05539174c4277d7b22 100644 (file)
@@ -297,7 +297,7 @@ struct address_space_operations {
        /* Set a page dirty */
        int (*set_page_dirty)(struct page *page);
 
-       int (*readpages)(struct address_space *mapping,
+       int (*readpages)(struct file *filp, struct address_space *mapping,
                        struct list_head *pages, unsigned nr_pages);
 
        /*
index 61285671c7931db4f80fe8990f83d24e7096dab3..56de20398946a8ea0dca2fa37f50b9793133947d 100644 (file)
@@ -52,7 +52,7 @@ read_pages(struct address_space *mapping, struct file *filp,
        pagevec_init(&lru_pvec, 0);
 
        if (mapping->a_ops->readpages)
-               return mapping->a_ops->readpages(mapping, pages, nr_pages);
+               return mapping->a_ops->readpages(filp, mapping, pages, nr_pages);
 
        for (page_idx = 0; page_idx < nr_pages; page_idx++) {
                struct page *page = list_entry(pages->prev, struct page, list);