diff mbox series

writeback: remove unused variable

Message ID 20200528033740.17269-1-yuchao0@huawei.com (mailing list archive)
State New, archived
Headers show
Series writeback: remove unused variable | expand

Commit Message

Chao Yu May 28, 2020, 3:37 a.m. UTC
Commit 64081362e8ff ("mm/page-writeback.c: fix range_cyclic writeback
vs writepages deadlock") left unused variable, remove it.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 mm/page-writeback.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

David Hildenbrand May 28, 2020, 8:35 a.m. UTC | #1
On 28.05.20 05:37, Chao Yu wrote:
> Commit 64081362e8ff ("mm/page-writeback.c: fix range_cyclic writeback
> vs writepages deadlock") left unused variable, remove it.
> 
> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> ---
>  mm/page-writeback.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index a53f4cfa7628..7e9714d2ce9d 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -2160,7 +2160,6 @@ int write_cache_pages(struct address_space *mapping,
>  	int error;
>  	struct pagevec pvec;
>  	int nr_pages;
> -	pgoff_t uninitialized_var(writeback_index);
>  	pgoff_t index;
>  	pgoff_t end;		/* Inclusive */
>  	pgoff_t done_index;
> @@ -2169,8 +2168,7 @@ int write_cache_pages(struct address_space *mapping,
>  
>  	pagevec_init(&pvec);
>  	if (wbc->range_cyclic) {
> -		writeback_index = mapping->writeback_index; /* prev offset */
> -		index = writeback_index;
> +		index = mapping->writeback_index; /* prev offset */
>  		end = -1;
>  	} else {
>  		index = wbc->range_start >> PAGE_SHIFT;
> 

Reviewed-by: David Hildenbrand <david@redhat.com>
diff mbox series

Patch

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index a53f4cfa7628..7e9714d2ce9d 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -2160,7 +2160,6 @@  int write_cache_pages(struct address_space *mapping,
 	int error;
 	struct pagevec pvec;
 	int nr_pages;
-	pgoff_t uninitialized_var(writeback_index);
 	pgoff_t index;
 	pgoff_t end;		/* Inclusive */
 	pgoff_t done_index;
@@ -2169,8 +2168,7 @@  int write_cache_pages(struct address_space *mapping,
 
 	pagevec_init(&pvec);
 	if (wbc->range_cyclic) {
-		writeback_index = mapping->writeback_index; /* prev offset */
-		index = writeback_index;
+		index = mapping->writeback_index; /* prev offset */
 		end = -1;
 	} else {
 		index = wbc->range_start >> PAGE_SHIFT;