Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp375758pxv; Wed, 30 Jun 2021 07:36:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEbbUBfC0aeRb+FE+dsGw5icwFRHBhH7zjukPO2LmzExFGGKOpdtGr5geUQPD68+r777VV X-Received: by 2002:a05:6402:51d0:: with SMTP id r16mr26754366edd.378.1625063761954; Wed, 30 Jun 2021 07:36:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625063761; cv=none; d=google.com; s=arc-20160816; b=xoMKyETH7vjKPYwKf2vMgCs42seDhM0QnvbALCEmz5Rhbv4XXu8KGPChRuYlyki+4g 2RtcSR6p6jDzk4BkeyE2yv8K/vvUBSsnBKvWUzQB+7Hu0o7W8m0AJ+dyDOSmBVCYNEXB sTeTWunsgQxyhAGdXMr/NlLuSyDYauqp+fVAMTLy9CJPdIBqHwUdj5sSXVELYURQCnjj SXl1GCPcqaxZ7PTJvz0VHyIqEQVD14i05ZvPh9kUOM8sxrLJAqgtN3dmRLeyJtP8Qkpu rB8vBWJxxVYqJXP1TQO0eUX4g2rLOU3g2h3LYJTy9sD2asY/TOPlIVHCswgARqPdw7qc lygg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=yYZx7OJCN/9Q00hcQpF22VIKH/8bsew3VKwL0pMebUs=; b=0rzbrSGLQub9y+cVtbU/ZP3IWFMdR4LyKoUCPTbI97avhAfIAjlfDWw6t6h/X36bXV J21GtJEYJPb+miDszNgLlF9F9/KYkyhVvbgK6vU2uoHpgyXK3uLBemak+2piIV9BX0mp NKvLhnJYQ3cYjqXtoXQ/lRDo2wC+V7vPINQZDEAVgbQUFxbCNfnqpng45vf7SXyaYHgp MUE4Yat1iP85OkYaF/6DDaEU7D/+AfsjfdmsZdyM/VS95UJK1eREyw5lGsaKOvuWgWnq 2WeOi9OSFJlNO47NUsNjc84ViSEGAhZXEhbj6IzwbpzlefDzCulIrwuCiwEjxuwyW8Sj XmaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@126.com header.s=s110527 header.b=j4HcDOFS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=126.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b31si3077074edf.385.2021.06.30.07.35.38; Wed, 30 Jun 2021 07:36:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@126.com header.s=s110527 header.b=j4HcDOFS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=126.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235051AbhF3Ogn (ORCPT + 99 others); Wed, 30 Jun 2021 10:36:43 -0400 Received: from m15112.mail.126.com ([220.181.15.112]:50519 "EHLO m15112.mail.126.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234882AbhF3Ogm (ORCPT ); Wed, 30 Jun 2021 10:36:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id; bh=yYZx7OJCN/9Q00hcQp F22VIKH/8bsew3VKwL0pMebUs=; b=j4HcDOFS4qudeFtIG63tbPCVso/nQ+jv0s jwOr+0qsLh3PgshpNUv0ULGkbcHjZyaj8AuNAaSDVAdD/EOslPd3Vpeoe0AWof5z nh/6hDDESwT6tq63/VPTEX+fBWupBySpwiQODe6ZYbvGvWC4F6/lt70+8yvjvFHf y4BAoGFaU= Received: from 192.168.137.133 (unknown [112.10.75.196]) by smtp2 (Coremail) with SMTP id DMmowAAnFKLdgNxg3RjqCg--.15597S3; Wed, 30 Jun 2021 22:34:07 +0800 (CST) From: Xianting Tian To: damien.lemoal@wdc.com, naohiro.aota@wdc.com, jth@kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Xianting Tian Subject: [PATCH] zonefs: remove redundant null bio check Date: Wed, 30 Jun 2021 10:33:36 -0400 Message-Id: <1625063616-8467-1-git-send-email-xianting_tian@126.com> X-Mailer: git-send-email 1.8.3.1 X-CM-TRANSID: DMmowAAnFKLdgNxg3RjqCg--.15597S3 X-Coremail-Antispam: 1Uf129KBjvdXoWruF18tw4DtFW3ury7uF43Awb_yoW3Wwc_J3 yIqa97WrWUJrnIk3y2g3yFvryF93WY93WUWF1Fy3W3XF4Dtws5Cw1qvw1fZw15Za1SvFZ8 Ja10grW29r40gjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU0wNVDUUUUU== X-Originating-IP: [112.10.75.196] X-CM-SenderInfo: h0ld03plqjs3xldqqiyswou0bp/1tbi5h-BpFpEBONwPgAAsr Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xianting Tian bio_alloc() with __GFP_DIRECT_RECLAIM, which is included in GFP_NOFS, never fails, see comments in bio_alloc_bioset(). Signed-off-by: Xianting Tian --- fs/zonefs/super.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index cd145d3..d6d08da 100644 --- a/fs/zonefs/super.c +++ b/fs/zonefs/super.c @@ -705,9 +705,6 @@ static ssize_t zonefs_file_dio_append(struct kiocb *iocb, struct iov_iter *from) return 0; bio = bio_alloc(GFP_NOFS, nr_pages); - if (!bio) - return -ENOMEM; - bio_set_dev(bio, bdev); bio->bi_iter.bi_sector = zi->i_zsector; bio->bi_write_hint = iocb->ki_hint; -- 1.8.3.1