2020-10-20 10:26:00

by Tianxianting

[permalink] [raw]
Subject: [PATCH] ext4: remove the null check of bio_vec page

bv_page can't be NULL in a valid bio_vec, so we can remove the NULL check,
as we did in other places when calling bio_for_each_segment_all() to go
through all bio_vec of a bio.

Signed-off-by: Xianting Tian <[email protected]>
---
fs/ext4/page-io.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index defd2e10d..cb135a944 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -111,9 +111,6 @@ static void ext4_finish_bio(struct bio *bio)
unsigned under_io = 0;
unsigned long flags;

- if (!page)
- continue;
-
if (fscrypt_is_bounce_page(page)) {
bounce_page = page;
page = fscrypt_pagecache_page(bounce_page);
--
2.17.1


2020-10-21 13:27:20

by Jan Kara

[permalink] [raw]
Subject: Re: [PATCH] ext4: remove the null check of bio_vec page

On Tue 20-10-20 16:22:01, Xianting Tian wrote:
> bv_page can't be NULL in a valid bio_vec, so we can remove the NULL check,
> as we did in other places when calling bio_for_each_segment_all() to go
> through all bio_vec of a bio.
>
> Signed-off-by: Xianting Tian <[email protected]>

Thanks for the patch. It looks good to me. You can add:

Reviewed-by: Jan Kara <[email protected]>

Honza

> ---
> fs/ext4/page-io.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
> index defd2e10d..cb135a944 100644
> --- a/fs/ext4/page-io.c
> +++ b/fs/ext4/page-io.c
> @@ -111,9 +111,6 @@ static void ext4_finish_bio(struct bio *bio)
> unsigned under_io = 0;
> unsigned long flags;
>
> - if (!page)
> - continue;
> -
> if (fscrypt_is_bounce_page(page)) {
> bounce_page = page;
> page = fscrypt_pagecache_page(bounce_page);
> --
> 2.17.1
>
--
Jan Kara <[email protected]>
SUSE Labs, CR

2020-10-23 16:41:42

by Tianxianting

[permalink] [raw]
Subject: RE: [PATCH] ext4: remove the null check of bio_vec page

Thanks Jan
Can be the patch applied?

-----Original Message-----
From: Jan Kara [mailto:[email protected]]
Sent: Wednesday, October 21, 2020 6:25 PM
To: tianxianting (RD) <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] ext4: remove the null check of bio_vec page

On Tue 20-10-20 16:22:01, Xianting Tian wrote:
> bv_page can't be NULL in a valid bio_vec, so we can remove the NULL
> check, as we did in other places when calling
> bio_for_each_segment_all() to go through all bio_vec of a bio.
>
> Signed-off-by: Xianting Tian <[email protected]>

Thanks for the patch. It looks good to me. You can add:

Reviewed-by: Jan Kara <[email protected]>

Honza

> ---
> fs/ext4/page-io.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c index
> defd2e10d..cb135a944 100644
> --- a/fs/ext4/page-io.c
> +++ b/fs/ext4/page-io.c
> @@ -111,9 +111,6 @@ static void ext4_finish_bio(struct bio *bio)
> unsigned under_io = 0;
> unsigned long flags;
>
> - if (!page)
> - continue;
> -
> if (fscrypt_is_bounce_page(page)) {
> bounce_page = page;
> page = fscrypt_pagecache_page(bounce_page);
> --
> 2.17.1
>
--
Jan Kara <[email protected]>
SUSE Labs, CR

2020-10-23 18:56:11

by Jan Kara

[permalink] [raw]
Subject: Re: [PATCH] ext4: remove the null check of bio_vec page

On Fri 23-10-20 16:38:16, Tianxianting wrote:
> Thanks Jan
> Can be the patch applied?

Ted Tso is the ext4 maintainer so he should eventually pick up and apply
the patch. But since there's merge window currently open, I guess he's busy
shuffling patches to send to Linus. I'd expect he'll get to your patch in a
week or two.

Honza

>
> -----Original Message-----
> From: Jan Kara [mailto:[email protected]]
> Sent: Wednesday, October 21, 2020 6:25 PM
> To: tianxianting (RD) <[email protected]>
> Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
> Subject: Re: [PATCH] ext4: remove the null check of bio_vec page
>
> On Tue 20-10-20 16:22:01, Xianting Tian wrote:
> > bv_page can't be NULL in a valid bio_vec, so we can remove the NULL
> > check, as we did in other places when calling
> > bio_for_each_segment_all() to go through all bio_vec of a bio.
> >
> > Signed-off-by: Xianting Tian <[email protected]>
>
> Thanks for the patch. It looks good to me. You can add:
>
> Reviewed-by: Jan Kara <[email protected]>
>
> Honza
>
> > ---
> > fs/ext4/page-io.c | 3 ---
> > 1 file changed, 3 deletions(-)
> >
> > diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c index
> > defd2e10d..cb135a944 100644
> > --- a/fs/ext4/page-io.c
> > +++ b/fs/ext4/page-io.c
> > @@ -111,9 +111,6 @@ static void ext4_finish_bio(struct bio *bio)
> > unsigned under_io = 0;
> > unsigned long flags;
> >
> > - if (!page)
> > - continue;
> > -
> > if (fscrypt_is_bounce_page(page)) {
> > bounce_page = page;
> > page = fscrypt_pagecache_page(bounce_page);
> > --
> > 2.17.1
> >
> --
> Jan Kara <[email protected]>
> SUSE Labs, CR
--
Jan Kara <[email protected]>
SUSE Labs, CR

2020-12-03 14:15:18

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH] ext4: remove the null check of bio_vec page

On Wed, Oct 21, 2020 at 12:25:03PM +0200, Jan Kara wrote:
> On Tue 20-10-20 16:22:01, Xianting Tian wrote:
> > bv_page can't be NULL in a valid bio_vec, so we can remove the NULL check,
> > as we did in other places when calling bio_for_each_segment_all() to go
> > through all bio_vec of a bio.
> >
> > Signed-off-by: Xianting Tian <[email protected]>
>
> Thanks for the patch. It looks good to me. You can add:
>
> Reviewed-by: Jan Kara <[email protected]>

Applied, thanks.

- Ted

2020-12-04 01:30:17

by Tianxianting

[permalink] [raw]
Subject: RE: [PATCH] ext4: remove the null check of bio_vec page

Thanks Ted :)

-----Original Message-----
From: Theodore Y. Ts'o [mailto:[email protected]]
Sent: Thursday, December 03, 2020 10:11 PM
To: Jan Kara <[email protected]>
Cc: tianxianting (RD) <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] ext4: remove the null check of bio_vec page

On Wed, Oct 21, 2020 at 12:25:03PM +0200, Jan Kara wrote:
> On Tue 20-10-20 16:22:01, Xianting Tian wrote:
> > bv_page can't be NULL in a valid bio_vec, so we can remove the NULL
> > check, as we did in other places when calling
> > bio_for_each_segment_all() to go through all bio_vec of a bio.
> >
> > Signed-off-by: Xianting Tian <[email protected]>
>
> Thanks for the patch. It looks good to me. You can add:
>
> Reviewed-by: Jan Kara <[email protected]>

Applied, thanks.

- Ted