From: Mateusz Nosek <[email protected]>
Previously 0 was assigned to variable 'lruvec_size',
but the variable was never read later.
So the assignment can be removed.
Signed-off-by: Mateusz Nosek <[email protected]>
---
mm/vmscan.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index f14c8c6069a6..a605ff36f126 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2427,10 +2427,8 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
case SCAN_FILE:
case SCAN_ANON:
/* Scan one type exclusively */
- if ((scan_balance == SCAN_FILE) != file) {
- lruvec_size = 0;
+ if ((scan_balance == SCAN_FILE) != file)
scan = 0;
- }
break;
default:
/* Look ma, no brain */
--
2.17.1
On Sat, Feb 29, 2020 at 10:40:22PM +0100, [email protected] wrote:
> From: Mateusz Nosek <[email protected]>
>
> Previously 0 was assigned to variable 'lruvec_size',
> but the variable was never read later.
> So the assignment can be removed.
>
> Signed-off-by: Mateusz Nosek <[email protected]>
It _was_ used, until commit f87bccde6a7dd1bdb219a4045e8ac111590c9314
which removed lru_pages. So this is just a left-over, and I agree it's
now superfluous.
Reviewed-by: Matthew Wilcox (Oracle) <[email protected]>
On Sat, Feb 29, 2020 at 10:40:22PM +0100, [email protected] wrote:
>From: Mateusz Nosek <[email protected]>
>
>Previously 0 was assigned to variable 'lruvec_size',
>but the variable was never read later.
>So the assignment can be removed.
>
>Signed-off-by: Mateusz Nosek <[email protected]>
Reviewed-by: Wei Yang <[email protected]>
--
Wei Yang
Help you, Help me
On 29.02.20 22:40, [email protected] wrote:
> From: Mateusz Nosek <[email protected]>
>
> Previously 0 was assigned to variable 'lruvec_size',
> but the variable was never read later.
> So the assignment can be removed.
>
> Signed-off-by: Mateusz Nosek <[email protected]>
> ---
> mm/vmscan.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index f14c8c6069a6..a605ff36f126 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -2427,10 +2427,8 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
> case SCAN_FILE:
> case SCAN_ANON:
> /* Scan one type exclusively */
> - if ((scan_balance == SCAN_FILE) != file) {
> - lruvec_size = 0;
> + if ((scan_balance == SCAN_FILE) != file)
> scan = 0;
> - }
> break;
> default:
> /* Look ma, no brain */
>
Reviewed-by: David Hildenbrand <[email protected]>
--
Thanks,
David / dhildenb