From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Date: Fri, 5 May 2023 08:11:52 -0600 Subject: [Cluster-devel] [PATCH v5 00/20] bio: check return values of bio_add_page In-Reply-To: <1ac1fc5e-3c32-9d62-65bf-5ccbb82c37cc@wdc.com> References: <20230502101934.24901-1-johannes.thumshirn@wdc.com> <1ac1fc5e-3c32-9d62-65bf-5ccbb82c37cc@wdc.com> Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On 5/5/23 2:09?AM, Johannes Thumshirn wrote: > On 02.05.23 12:20, Johannes Thumshirn wrote: >> We have two functions for adding a page to a bio, __bio_add_page() which is >> used to add a single page to a freshly created bio and bio_add_page() which is >> used to add a page to an existing bio. >> >> While __bio_add_page() is expected to succeed, bio_add_page() can fail. >> >> This series converts the callers of bio_add_page() which can easily use >> __bio_add_page() to using it and checks the return of bio_add_page() for >> callers that don't work on a freshly created bio. >> >> Lastly it marks bio_add_page() as __must_check so we don't have to go again >> and audit all callers. >> >> Changes to v4: >> - Rebased onto latest Linus' master >> - Dropped already merged patches >> - Added Sergey's Reviewed-by >> >> Changes to v3: >> - Added __bio_add_folio and use it in iomap (Willy) >> - Mark bio_add_folio must check (Willy) >> - s/GFS/GFS2/ (Andreas) >> >> Changes to v2: >> - Removed 'wont fail' comments pointed out by Song >> >> Changes to v1: >> - Removed pointless comment pointed out by Willy >> - Changed commit messages pointed out by Damien >> - Colledted Damien's Reviews and Acks > > Jens any comments on this? I'll take a look post -rc1. -- Jens Axboe