From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C01BEC4363A for ; Wed, 21 Oct 2020 10:25:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5E8DF206DD for ; Wed, 21 Oct 2020 10:25:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441687AbgJUKZH (ORCPT ); Wed, 21 Oct 2020 06:25:07 -0400 Received: from mx2.suse.de ([195.135.220.15]:33788 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2441675AbgJUKZG (ORCPT ); Wed, 21 Oct 2020 06:25:06 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 25446ACE5; Wed, 21 Oct 2020 10:25:05 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 5A5521E0E97; Wed, 21 Oct 2020 12:25:03 +0200 (CEST) Date: Wed, 21 Oct 2020 12:25:03 +0200 From: Jan Kara To: Xianting Tian 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 Message-ID: <20201021102503.GC19726@quack2.suse.cz> References: <20201020082201.34257-1-tian.xianting@h3c.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201020082201.34257-1-tian.xianting@h3c.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Thanks for the patch. It looks good to me. You can add: Reviewed-by: Jan Kara 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 SUSE Labs, CR