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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 156E7C10F14 for ; Thu, 3 Oct 2019 13:07:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E523B215EA for ; Thu, 3 Oct 2019 13:07:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729529AbfJCNHl (ORCPT ); Thu, 3 Oct 2019 09:07:41 -0400 Received: from mx2.suse.de ([195.135.220.15]:55332 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727221AbfJCNHl (ORCPT ); Thu, 3 Oct 2019 09:07:41 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 57ABDAD95; Thu, 3 Oct 2019 13:07:39 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 62D41DA890; Thu, 3 Oct 2019 15:07:56 +0200 (CEST) Date: Thu, 3 Oct 2019 15:07:56 +0200 From: David Sterba To: dsterba@suse.cz, Nikolay Borisov , fdmanana@gmail.com, linux-btrfs Subject: Re: [PATCH v2] btrfs: Properly handle backref_in_log retval Message-ID: <20191003130756.GT2751@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Nikolay Borisov , fdmanana@gmail.com, linux-btrfs References: <20190924170920.GB2751@twin.jikos.cz> <20190925110303.20466-1-nborisov@suse.com> <93c09683-2a67-a6e5-8853-9092912d48f7@suse.com> <20191003125559.GS2751@twin.jikos.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191003125559.GS2751@twin.jikos.cz> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Thu, Oct 03, 2019 at 02:55:59PM +0200, David Sterba wrote: > On Thu, Sep 26, 2019 at 01:39:58PM +0300, Nikolay Borisov wrote: > > >> - if (backref_in_log(log_root, &search_key, dirid, name, name_len)) > > >> + ret = backref_in_log(log_root, &search_key, dirid, name, name_len); > > >> + if (ret == 1) > > >> return true; > > > > > > This function also needs to be able to return errors and its caller > > > check for errors. > > > > Yes but this is for a follow up patch. The current patch does not make > > the code any more broken than it currently is. > > I'm going to merge the patches, please send the followup patch soon, so > we don't forget about adding the proper error handling. Thanks. Never mind, the patch 3/3 inlines the function and the error handling is integrated to the caller.