All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][mmtom] remove file arguement of swap_readpage
@ 2009-06-05 14:33 ` Minchan Kim
  0 siblings, 0 replies; 6+ messages in thread
From: Minchan Kim @ 2009-06-05 14:33 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, linux-kernel, Minchan Kim, Hugh Dickins, Rik van Riel

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.

Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: Rik van Riel <riel@redhat.com>
---
 include/linux/swap.h |    2 +-
 mm/page_io.c         |    2 +-
 mm/swap_state.c      |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/swap.h b/include/linux/swap.h
index 2dedc2d..c88b366 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -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);
 
diff --git a/mm/page_io.c b/mm/page_io.c
index 3023c47..c6f3e50 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -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;
diff --git a/mm/swap_state.c b/mm/swap_state.c
index b62e7f5..42cd38e 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -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);
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH][mmtom] remove file arguement of swap_readpage
@ 2009-06-05 14:33 ` Minchan Kim
  0 siblings, 0 replies; 6+ messages in thread
From: Minchan Kim @ 2009-06-05 14:33 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, linux-kernel, Minchan Kim, Hugh Dickins, Rik van Riel

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.

Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: Rik van Riel <riel@redhat.com>
---
 include/linux/swap.h |    2 +-
 mm/page_io.c         |    2 +-
 mm/swap_state.c      |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/swap.h b/include/linux/swap.h
index 2dedc2d..c88b366 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -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);
 
diff --git a/mm/page_io.c b/mm/page_io.c
index 3023c47..c6f3e50 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -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;
diff --git a/mm/swap_state.c b/mm/swap_state.c
index b62e7f5..42cd38e 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -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);
-- 
1.5.6.5

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH][mmtom] remove file arguement of swap_readpage
  2009-06-05 14:33 ` Minchan Kim
@ 2009-06-05 15:04   ` Rik van Riel
  -1 siblings, 0 replies; 6+ messages in thread
From: Rik van Riel @ 2009-06-05 15:04 UTC (permalink / raw)
  To: Minchan Kim; +Cc: Andrew Morton, linux-mm, linux-kernel, Hugh Dickins

Minchan Kim wrote:
> 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.
> 
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
> Cc: Rik van Riel <riel@redhat.com>

Reviewed-by: Rik van Riel <riel@redhat.com>

-- 
All rights reversed.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH][mmtom] remove file arguement of swap_readpage
@ 2009-06-05 15:04   ` Rik van Riel
  0 siblings, 0 replies; 6+ messages in thread
From: Rik van Riel @ 2009-06-05 15:04 UTC (permalink / raw)
  To: Minchan Kim; +Cc: Andrew Morton, linux-mm, linux-kernel, Hugh Dickins

Minchan Kim wrote:
> 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.
> 
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
> Cc: Rik van Riel <riel@redhat.com>

Reviewed-by: Rik van Riel <riel@redhat.com>

-- 
All rights reversed.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH][mmtom] remove file arguement of swap_readpage
  2009-06-05 14:33 ` Minchan Kim
@ 2009-06-05 18:05   ` Hugh Dickins
  -1 siblings, 0 replies; 6+ messages in thread
From: Hugh Dickins @ 2009-06-05 18:05 UTC (permalink / raw)
  To: Minchan Kim
  Cc: Andrew Morton, linux-mm, linux-kernel, Hugh Dickins, Rik van Riel

On Fri, 5 Jun 2009, Minchan Kim wrote:

> 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.
> 
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
> Cc: Rik van Riel <riel@redhat.com>

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

Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>

> ---
>  include/linux/swap.h |    2 +-
>  mm/page_io.c         |    2 +-
>  mm/swap_state.c      |    2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/swap.h b/include/linux/swap.h
> index 2dedc2d..c88b366 100644
> --- a/include/linux/swap.h
> +++ b/include/linux/swap.h
> @@ -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);
>  
> diff --git a/mm/page_io.c b/mm/page_io.c
> index 3023c47..c6f3e50 100644
> --- a/mm/page_io.c
> +++ b/mm/page_io.c
> @@ -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;
> diff --git a/mm/swap_state.c b/mm/swap_state.c
> index b62e7f5..42cd38e 100644
> --- a/mm/swap_state.c
> +++ b/mm/swap_state.c
> @@ -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);
> -- 
> 1.5.6.5
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH][mmtom] remove file arguement of swap_readpage
@ 2009-06-05 18:05   ` Hugh Dickins
  0 siblings, 0 replies; 6+ messages in thread
From: Hugh Dickins @ 2009-06-05 18:05 UTC (permalink / raw)
  To: Minchan Kim
  Cc: Andrew Morton, linux-mm, linux-kernel, Hugh Dickins, Rik van Riel

On Fri, 5 Jun 2009, Minchan Kim wrote:

> 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.
> 
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
> Cc: Rik van Riel <riel@redhat.com>

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

Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>

> ---
>  include/linux/swap.h |    2 +-
>  mm/page_io.c         |    2 +-
>  mm/swap_state.c      |    2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/swap.h b/include/linux/swap.h
> index 2dedc2d..c88b366 100644
> --- a/include/linux/swap.h
> +++ b/include/linux/swap.h
> @@ -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);
>  
> diff --git a/mm/page_io.c b/mm/page_io.c
> index 3023c47..c6f3e50 100644
> --- a/mm/page_io.c
> +++ b/mm/page_io.c
> @@ -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;
> diff --git a/mm/swap_state.c b/mm/swap_state.c
> index b62e7f5..42cd38e 100644
> --- a/mm/swap_state.c
> +++ b/mm/swap_state.c
> @@ -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);
> -- 
> 1.5.6.5
> 

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-06-05 18:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-05 14:33 [PATCH][mmtom] remove file arguement of swap_readpage Minchan Kim
2009-06-05 14:33 ` Minchan Kim
2009-06-05 15:04 ` Rik van Riel
2009-06-05 15:04   ` Rik van Riel
2009-06-05 18:05 ` Hugh Dickins
2009-06-05 18:05   ` Hugh Dickins

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.