linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: remove the null check of bio_vec page
@ 2020-10-20  8:22 Xianting Tian
  2020-10-21 10:25 ` Jan Kara
  0 siblings, 1 reply; 7+ messages in thread
From: Xianting Tian @ 2020-10-20  8:22 UTC (permalink / raw)
  To: tytso, adilger.kernel, jack; +Cc: linux-ext4, linux-kernel, Xianting Tian

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 <tian.xianting@h3c.com>
---
 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


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

* Re: [PATCH] ext4: remove the null check of bio_vec page
  2020-10-20  8:22 [PATCH] ext4: remove the null check of bio_vec page Xianting Tian
@ 2020-10-21 10:25 ` Jan Kara
  2020-10-23 16:38   ` Tianxianting
  2020-12-03 14:11   ` Theodore Y. Ts'o
  0 siblings, 2 replies; 7+ messages in thread
From: Jan Kara @ 2020-10-21 10:25 UTC (permalink / raw)
  To: Xianting Tian; +Cc: tytso, adilger.kernel, jack, linux-ext4, linux-kernel

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 <tian.xianting@h3c.com>

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

Reviewed-by: Jan Kara <jack@suse.cz>

								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 <jack@suse.com>
SUSE Labs, CR

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

* RE: [PATCH] ext4: remove the null check of bio_vec page
  2020-10-21 10:25 ` Jan Kara
@ 2020-10-23 16:38   ` Tianxianting
  2020-10-23 16:56     ` Jan Kara
  2020-12-03 14:11   ` Theodore Y. Ts'o
  1 sibling, 1 reply; 7+ messages in thread
From: Tianxianting @ 2020-10-23 16:38 UTC (permalink / raw)
  To: Jan Kara, tytso, adilger.kernel; +Cc: linux-ext4, linux-kernel

Thanks Jan
Can be the patch applied?

-----Original Message-----
From: Jan Kara [mailto:jack@suse.cz] 
Sent: Wednesday, October 21, 2020 6:25 PM
To: tianxianting (RD) <tian.xianting@h3c.com>
Cc: tytso@mit.edu; adilger.kernel@dilger.ca; jack@suse.cz; linux-ext4@vger.kernel.org; linux-kernel@vger.kernel.org
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 <tian.xianting@h3c.com>

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

Reviewed-by: Jan Kara <jack@suse.cz>

								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 <jack@suse.com>
SUSE Labs, CR

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

* Re: [PATCH] ext4: remove the null check of bio_vec page
  2020-10-23 16:38   ` Tianxianting
@ 2020-10-23 16:56     ` Jan Kara
  2020-12-03  8:16       ` Tianxianting
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kara @ 2020-10-23 16:56 UTC (permalink / raw)
  To: Tianxianting; +Cc: Jan Kara, tytso, adilger.kernel, linux-ext4, linux-kernel

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:jack@suse.cz] 
> Sent: Wednesday, October 21, 2020 6:25 PM
> To: tianxianting (RD) <tian.xianting@h3c.com>
> Cc: tytso@mit.edu; adilger.kernel@dilger.ca; jack@suse.cz; linux-ext4@vger.kernel.org; linux-kernel@vger.kernel.org
> 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 <tian.xianting@h3c.com>
> 
> Thanks for the patch. It looks good to me. You can add:
> 
> Reviewed-by: Jan Kara <jack@suse.cz>
> 
> 								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 <jack@suse.com>
> SUSE Labs, CR
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

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

* RE: [PATCH] ext4: remove the null check of bio_vec page
  2020-10-23 16:56     ` Jan Kara
@ 2020-12-03  8:16       ` Tianxianting
  0 siblings, 0 replies; 7+ messages in thread
From: Tianxianting @ 2020-12-03  8:16 UTC (permalink / raw)
  To: Jan Kara, tytso; +Cc: adilger.kernel, linux-ext4, linux-kernel

Thanks Jan
Hi Ted Tso, Could I get your opinion of this patch?  thanks

-----Original Message-----
From: Jan Kara [mailto:jack@suse.cz] 
Sent: Saturday, October 24, 2020 12:57 AM
To: tianxianting (RD) <tian.xianting@h3c.com>
Cc: Jan Kara <jack@suse.cz>; tytso@mit.edu; adilger.kernel@dilger.ca; linux-ext4@vger.kernel.org; linux-kernel@vger.kernel.org
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:jack@suse.cz]
> Sent: Wednesday, October 21, 2020 6:25 PM
> To: tianxianting (RD) <tian.xianting@h3c.com>
> Cc: tytso@mit.edu; adilger.kernel@dilger.ca; jack@suse.cz; 
> linux-ext4@vger.kernel.org; linux-kernel@vger.kernel.org
> 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 <tian.xianting@h3c.com>
> 
> Thanks for the patch. It looks good to me. You can add:
> 
> Reviewed-by: Jan Kara <jack@suse.cz>
> 
> 								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 <jack@suse.com>
> SUSE Labs, CR
--
Jan Kara <jack@suse.com>
SUSE Labs, CR

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

* Re: [PATCH] ext4: remove the null check of bio_vec page
  2020-10-21 10:25 ` Jan Kara
  2020-10-23 16:38   ` Tianxianting
@ 2020-12-03 14:11   ` Theodore Y. Ts'o
  2020-12-04  1:27     ` Tianxianting
  1 sibling, 1 reply; 7+ messages in thread
From: Theodore Y. Ts'o @ 2020-12-03 14:11 UTC (permalink / raw)
  To: Jan Kara; +Cc: Xianting Tian, adilger.kernel, linux-ext4, linux-kernel

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 <tian.xianting@h3c.com>
> 
> Thanks for the patch. It looks good to me. You can add:
> 
> Reviewed-by: Jan Kara <jack@suse.cz>

Applied, thanks.

					- Ted

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

* RE: [PATCH] ext4: remove the null check of bio_vec page
  2020-12-03 14:11   ` Theodore Y. Ts'o
@ 2020-12-04  1:27     ` Tianxianting
  0 siblings, 0 replies; 7+ messages in thread
From: Tianxianting @ 2020-12-04  1:27 UTC (permalink / raw)
  To: Theodore Y. Ts'o, Jan Kara; +Cc: adilger.kernel, linux-ext4, linux-kernel

Thanks Ted :)

-----Original Message-----
From: Theodore Y. Ts'o [mailto:tytso@mit.edu] 
Sent: Thursday, December 03, 2020 10:11 PM
To: Jan Kara <jack@suse.cz>
Cc: tianxianting (RD) <tian.xianting@h3c.com>; adilger.kernel@dilger.ca; linux-ext4@vger.kernel.org; linux-kernel@vger.kernel.org
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 <tian.xianting@h3c.com>
> 
> Thanks for the patch. It looks good to me. You can add:
> 
> Reviewed-by: Jan Kara <jack@suse.cz>

Applied, thanks.

					- Ted

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

end of thread, other threads:[~2020-12-04  1:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-20  8:22 [PATCH] ext4: remove the null check of bio_vec page Xianting Tian
2020-10-21 10:25 ` Jan Kara
2020-10-23 16:38   ` Tianxianting
2020-10-23 16:56     ` Jan Kara
2020-12-03  8:16       ` Tianxianting
2020-12-03 14:11   ` Theodore Y. Ts'o
2020-12-04  1:27     ` Tianxianting

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).