Skip to contentSkip to conversation

remove file arguement of swap_readpage

PATCH In review Minchan Kim 3 participants 3 messages Jun 5, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove file arguement of swap_readpage

The file argument resulted from address_space's readpage long time ago.

Now we don't use it any more. Let's remove unnecessary argement.

This patch cleans up swap_readpage.
It doesn't affect behavior of function.

Cc Hugh Dickins <[email protected]>
Cc Rik van Riel <[email protected]>
---
 include/linux/swap.h |    2 +-
 mm/page_io.c         |    2 +-
 mm/swap_state.c      |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
include/linux/swap.h +1 -1
index 2dedc2d..c88b366 100644
@@ -256,7 +256,7 @@ extern void swap_unplug_io_fn(struct backing_dev_info *, struct page *);
 
 #ifdef CONFIG_SWAP
 /* linux/mm/page_io.c */
-extern int swap_readpage(struct file *, struct page *);
+extern int swap_readpage(struct page *);
 extern int swap_writepage(struct page *page, struct writeback_control *wbc);
 extern void end_swap_bio_read(struct bio *bio, int err);
 
mm/page_io.c +1 -1
index 3023c47..c6f3e50 100644
@@ -120,7 +120,7 @@ out:
 	return ret;
 }
 
-int swap_readpage(struct file *file, struct page *page)
+int swap_readpage(struct page *page)
 {
 	struct bio *bio;
 	int ret = 0;
mm/swap_state.c +1 -1
index b62e7f5..42cd38e 100644
@@ -313,7 +313,7 @@ struct page *read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask,
 			 * Initiate read into locked page and return.
 			 */
 			lru_cache_add_anon(new_page);
-			swap_readpage(NULL, new_page);
+			swap_readpage(new_page);
 			return new_page;
 		}
 		ClearPageSwapBacked(new_page);
Signature · 7 lines
1.5.6.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Minchan Kim

The file argument resulted from address_space's readpage long time ago.

Now we don't use it any more. Let's remove unnecessary argement.

Quoted 6 lines

This patch cleans up swap_readpage.
It doesn't affect behavior of function.

Cc Hugh Dickins <[email protected]>
Cc Rik van Riel <[email protected]>
Signature · 7 lines
All rights reversed.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Acked-by on v1 1/1
#2 lore raw
In reply to Minchan Kim
Quoted 6 lines · Minchan Kim

The file argument resulted from address_space's readpage long time ago.

Now we don't use it any more. Let's remove unnecessary argement.

Quoted 6 lines

This patch cleans up swap_readpage.
It doesn't affect behavior of function.

Cc Hugh Dickins <[email protected]>
Cc Rik van Riel <[email protected]>

Okay, yes: but don't be surprised if someone sends in a patch to put it back, as in the other readpage()s.

Quoted 48 lines
---
 include/linux/swap.h |    2 +-
 mm/page_io.c         |    2 +-
 mm/swap_state.c      |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
include/linux/swap.h +1 -1
index 2dedc2d..c88b366 100644
@@ -256,7 +256,7 @@ extern void swap_unplug_io_fn(struct backing_dev_info *, struct page *);
 
 #ifdef CONFIG_SWAP
 /* linux/mm/page_io.c */
-extern int swap_readpage(struct file *, struct page *);
+extern int swap_readpage(struct page *);
 extern int swap_writepage(struct page *page, struct writeback_control *wbc);
 extern void end_swap_bio_read(struct bio *bio, int err);
 
mm/page_io.c +1 -1
index 3023c47..c6f3e50 100644
@@ -120,7 +120,7 @@ out:
 	return ret;
 }
 
-int swap_readpage(struct file *file, struct page *page)
+int swap_readpage(struct page *page)
 {
 	struct bio *bio;
 	int ret = 0;
mm/swap_state.c +1 -1
index b62e7f5..42cd38e 100644
@@ -313,7 +313,7 @@ struct page *read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask,
 			 * Initiate read into locked page and return.
 			 */
 			lru_cache_add_anon(new_page);
-			swap_readpage(NULL, new_page);
+			swap_readpage(new_page);
 			return new_page;
 		}
 		ClearPageSwapBacked(new_page);
Signature · 1 line
1.5.6.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>