From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergey Senozhatsky Date: Fri, 21 Apr 2023 15:57:47 +0900 Subject: [Cluster-devel] [PATCH v4 13/22] zram: use __bio_add_page for adding single page to bio In-Reply-To: <20230420100501.32981-14-jth@kernel.org> References: <20230420100501.32981-1-jth@kernel.org> <20230420100501.32981-14-jth@kernel.org> Message-ID: <20230421065747.GB1496740@google.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit + Minchan On (23/04/20 12:04), Johannes Thumshirn wrote: > > From: Johannes Thumshirn > > The zram writeback code uses bio_add_page() to add a page to a newly > created bio. bio_add_page() can fail, but the return value is never > checked. > > Use __bio_add_page() as adding a single page to a newly created bio is > guaranteed to succeed. > > This brings us a step closer to marking bio_add_page() as __must_check. > > Signed-off-by: Johannes Thumshirn > Reviewed-by: Damien Le Moal Reviewed-by: Sergey Senozhatsky 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 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D45C5C77B73 for ; Mon, 24 Apr 2023 06:04:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682316250; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=B5ozoFbmwHGNcUi1ZWBIe045dVXGDpjG5YjhxaaZcl4=; b=aagdvMaNf++YHu6O+Ve4WkwEPnKAquxPsLRFEaV5NXm7ueas4+E8d4cHp2ukZBQLaHQe5a pb6M7+lZ1TIAFizAxKO9gFIJN7vdfW6qercxCCaOMVaUv8Zyp0g0i33BzbLr6+zCpedmw5 jk0oxOqNMvCvDHXANIKZ+HJFqvCWSnE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-605-huUgEPVCM2CeyEIPMKl0KQ-1; Mon, 24 Apr 2023 02:04:07 -0400 X-MC-Unique: huUgEPVCM2CeyEIPMKl0KQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 076C21C17437; Mon, 24 Apr 2023 06:04:06 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5384E492B0F; Mon, 24 Apr 2023 06:04:02 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3CF011946A48; Mon, 24 Apr 2023 06:04:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BC72B1946A40 for ; Fri, 21 Apr 2023 06:58:08 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 98822492C14; Fri, 21 Apr 2023 06:57:58 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 912CB492C13 for ; Fri, 21 Apr 2023 06:57:58 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 74D28101A554 for ; Fri, 21 Apr 2023 06:57:58 +0000 (UTC) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-471-LzbeR3XWOgyjXUsl_qux8A-1; Fri, 21 Apr 2023 02:57:56 -0400 X-MC-Unique: LzbeR3XWOgyjXUsl_qux8A-1 Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-63d4595d60fso12425913b3a.0 for ; Thu, 20 Apr 2023 23:57:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682060276; x=1684652276; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iCQQOrDHvv7muofgTvhggno9gmpvYe5WVwBD+zXre78=; b=dVD1Nnd3Ngfyd6AO2pqXOigEaBDBLwtMMpZKLMI1Cq7xps/T4T9fhLVRzBho40FPEE Oxq8mf73ni9Ebqj3oVdwiLWCsePyV2lfYLqjQWWoBlbvc9eQdjDn/yCOIXAi7wnUI62p JWt11sLp09No3lSw78w2yjaD9735lNYyIgm7qGZCuJzxJRJ1a7uooM2ZYvWfr/8bjRNU ng/PWUXywkWePlJZVmOSSH5FfnuZQPOlF09k/Xd/6JPWK5uFTdHkAtlDU78eH6Tjt7I1 Yc11IoLu3zV8c5zrICWyf60yqorMmlr35mBVe2mCBE9jtoMt3WGCsW8IlIwVwWprgavD E81A== X-Gm-Message-State: AAQBX9f1hpK8my9HnevuXAsumQl5r7VgIXNkGw9xdiR6hhjRIKWndgoc KoJLKdUheSCYwOwqJjUlloTfLQ== X-Google-Smtp-Source: AKy350ZEEP/PrU7kYgyyZkKivdaMPHUVf5WGz+Wiu1WQ8mlkUVfjfkCNB7ZnxyH4DOCp4JsT1PbWNg== X-Received: by 2002:aa7:8554:0:b0:63d:40bb:a88b with SMTP id y20-20020aa78554000000b0063d40bba88bmr8194787pfn.14.1682060275718; Thu, 20 Apr 2023 23:57:55 -0700 (PDT) Received: from google.com (KD124209188001.ppp-bb.dion.ne.jp. [124.209.188.1]) by smtp.gmail.com with ESMTPSA id 136-20020a63008e000000b0051806da5cd6sm2038374pga.60.2023.04.20.23.57.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 23:57:54 -0700 (PDT) Date: Fri, 21 Apr 2023 15:57:47 +0900 From: Sergey Senozhatsky To: Johannes Thumshirn Message-ID: <20230421065747.GB1496740@google.com> References: <20230420100501.32981-1-jth@kernel.org> <20230420100501.32981-14-jth@kernel.org> MIME-Version: 1.0 In-Reply-To: <20230420100501.32981-14-jth@kernel.org> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mailman-Approved-At: Mon, 24 Apr 2023 06:04:00 +0000 Subject: Re: [dm-devel] [PATCH v4 13/22] zram: use __bio_add_page for adding single page to bio X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: shaggy@kernel.org, jfs-discussion@lists.sourceforge.net, linux-mm@kvack.org, dm-devel@redhat.com, hch@lst.de, agruenba@redhat.com, Damien Le Moal , willy@infradead.org, cluster-devel@redhat.com, kch@nvidia.com, snitzer@kernel.org, ming.lei@redhat.com, linux-block@vger.kernel.org, rpeterso@redhat.com, dsterba@suse.com, axboe@kernel.dk, linux-raid@vger.kernel.org, damien.lemoal@wdc.com, song@kernel.org, johannes.thumshirn@wdc.com, Minchan Kim , linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: chromium.org Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit + Minchan On (23/04/20 12:04), Johannes Thumshirn wrote: > > From: Johannes Thumshirn > > The zram writeback code uses bio_add_page() to add a page to a newly > created bio. bio_add_page() can fail, but the return value is never > checked. > > Use __bio_add_page() as adding a single page to a newly created bio is > guaranteed to succeed. > > This brings us a step closer to marking bio_add_page() as __must_check. > > Signed-off-by: Johannes Thumshirn > Reviewed-by: Damien Le Moal Reviewed-by: Sergey Senozhatsky -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3437EC7618E for ; Fri, 21 Apr 2023 06:58:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230298AbjDUG6G (ORCPT ); Fri, 21 Apr 2023 02:58:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230328AbjDUG6E (ORCPT ); Fri, 21 Apr 2023 02:58:04 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E99B3170A for ; Thu, 20 Apr 2023 23:57:56 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-63b73203e0aso12292135b3a.1 for ; Thu, 20 Apr 2023 23:57:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1682060276; x=1684652276; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=iCQQOrDHvv7muofgTvhggno9gmpvYe5WVwBD+zXre78=; b=hbF+Bk8ojjiZO6o2ok3vxf1WbShiuo5T081GBEE0UAfUBksGieFJSgkGacjYqBeK8w zt8XcYoWlevrCYjZed9y77ALfx/FxTMIwIwFlhupB/WwZM1Z1umn0C+QVKNQOjZ4t1v4 rUbAMrVRBbyd04gOqF9r0veBQA2+tqYWKmYcY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682060276; x=1684652276; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iCQQOrDHvv7muofgTvhggno9gmpvYe5WVwBD+zXre78=; b=d4Pi6nZNr7SH7E/3ZTffOTgvHOptS0il6a66F+lBHGjvxgnHFu8/fKTaaTV30aPEr9 tWqyUshQTZne2sqUxDQwC3B/dd+lrU8Mmz90gKp+BzIKqzgwd0gLIiTwCwpdSaPx3e8n MrP26J7HbweDJN2y3ybjZgIv12Y6qAq0kpl7XnitTXD8rNyi8CS7HQi8u/a10SHO6w49 Q3FDTK3WB8Jdgx7xfduIyMw5js0pwAZyfaHIsahlt5T4NdZEOYhwdRu/xI5PBnXxcAUP b+LYUoHDlX4MNyOg1LU7QRxGcEOR2Z96pg5XcTOZ3reRcK+o5RjuecboVLFVHqbj4ZaP ZCFQ== X-Gm-Message-State: AAQBX9dVHtgDFC9mxU+oAha3Q6Zyd7q4VOyJhuXnl2A4Vc4IWzXd561O wufBDjljpGzz7U3NZ6YRgrakSg== X-Google-Smtp-Source: AKy350ZEEP/PrU7kYgyyZkKivdaMPHUVf5WGz+Wiu1WQ8mlkUVfjfkCNB7ZnxyH4DOCp4JsT1PbWNg== X-Received: by 2002:aa7:8554:0:b0:63d:40bb:a88b with SMTP id y20-20020aa78554000000b0063d40bba88bmr8194787pfn.14.1682060275718; Thu, 20 Apr 2023 23:57:55 -0700 (PDT) Received: from google.com (KD124209188001.ppp-bb.dion.ne.jp. [124.209.188.1]) by smtp.gmail.com with ESMTPSA id 136-20020a63008e000000b0051806da5cd6sm2038374pga.60.2023.04.20.23.57.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 23:57:54 -0700 (PDT) Date: Fri, 21 Apr 2023 15:57:47 +0900 From: Sergey Senozhatsky To: Johannes Thumshirn Cc: axboe@kernel.dk, johannes.thumshirn@wdc.com, agruenba@redhat.com, cluster-devel@redhat.com, damien.lemoal@wdc.com, dm-devel@redhat.com, dsterba@suse.com, hare@suse.de, hch@lst.de, jfs-discussion@lists.sourceforge.net, kch@nvidia.com, linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-raid@vger.kernel.org, ming.lei@redhat.com, rpeterso@redhat.com, shaggy@kernel.org, snitzer@kernel.org, song@kernel.org, willy@infradead.org, Damien Le Moal , Minchan Kim Subject: Re: [PATCH v4 13/22] zram: use __bio_add_page for adding single page to bio Message-ID: <20230421065747.GB1496740@google.com> References: <20230420100501.32981-1-jth@kernel.org> <20230420100501.32981-14-jth@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230420100501.32981-14-jth@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org + Minchan On (23/04/20 12:04), Johannes Thumshirn wrote: > > From: Johannes Thumshirn > > The zram writeback code uses bio_add_page() to add a page to a newly > created bio. bio_add_page() can fail, but the return value is never > checked. > > Use __bio_add_page() as adding a single page to a newly created bio is > guaranteed to succeed. > > This brings us a step closer to marking bio_add_page() as __must_check. > > Signed-off-by: Johannes Thumshirn > Reviewed-by: Damien Le Moal Reviewed-by: Sergey Senozhatsky