Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3049357imm; Sun, 5 Aug 2018 19:44:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfV8hk9svvJKAms2wFIh8ndUEzmlXbyExFel53MfrbMTR6FdGvmuCFkOfwu3tAotZcZw3It X-Received: by 2002:a62:1f8c:: with SMTP id l12-v6mr15293935pfj.143.1533523443905; Sun, 05 Aug 2018 19:44:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533523443; cv=none; d=google.com; s=arc-20160816; b=W4Jv7rZ1dus9hE4KtOGXygUKov764tIzdOWF0rwr3i2RlDNnsE908fRze6A8Zogw/H w3mXG7JmhjJfiN4kkTg5ju6A8SHJicmBjZtYqckxQyfFilrF0hEY1SsWS60+m0EP3llZ RF+iVHcFqTLxDBk387+M7rTi/8aUX0OeGqYwOxQcyLmbQF3XbUpGUughqa7CP8N7igPh c+Xbp2niQ2HgPR0GBbfiMQcRgICpUG4Lrbk5TqgNQfHN4/ioSdqjPTPqCu7jxSwSbo9A WGnunSKv6Y44Eg9grUIulk5r2ZoPZmA/7LCL325a2gGp8gsc9kNQnB69DvPYBLm981Fv ODIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id:arc-authentication-results; bh=sxZI1jZE+AAbw+OvLDUleWkIOKqJIbdW5dsLlrN/cbk=; b=UHUcgACN3TekLLPyfK2IPcXdL39EC7Q0QeaIKvw7ej3xJa0umEBOHzcDOrUBL/QEBO LZQbBi2OVbduAWklhaaROUk293c0jAjeFXb6PHCKq+kAC6EaDgnQ0Vt9iRT7QFeWWHnE uItb+gm3X1sVYNiiOcjbFSzGOGo3d1wHt809cCAIbtgHagwfXpryCZeR87OL3zJPC3Z/ c2hpHiraLqA/cgaZ/a1QtthY5OE3EgpQ+Pp1mn32X65wagK05P1fSL6+JEG38dn2+8P0 q/g/ViNXqq9wN0ZbCcQV7fnQ7XPbN9UqFoxg3BX1lNloTjdGh4y4qEIFPp9i97/cCggR m2Sg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h18-v6si10606866pgd.238.2018.08.05.19.43.48; Sun, 05 Aug 2018 19:44:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727021AbeHFEty (ORCPT + 99 others); Mon, 6 Aug 2018 00:49:54 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:10633 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726303AbeHFEty (ORCPT ); Mon, 6 Aug 2018 00:49:54 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 6C4D985EF3E90; Mon, 6 Aug 2018 10:42:56 +0800 (CST) Received: from [127.0.0.1] (10.177.29.68) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.399.0; Mon, 6 Aug 2018 10:42:54 +0800 Message-ID: <5B67B5B0.7040006@huawei.com> Date: Mon, 6 Aug 2018 10:42:56 +0800 From: zhong jiang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Nikolay Borisov CC: , , , , Subject: Re: [PATCH 1/3] fs/btrfs/disk-io: Remove unneeded variable "err" References: <1533481371-21349-1-git-send-email-zhongjiang@huawei.com> <1533481371-21349-2-git-send-email-zhongjiang@huawei.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.68] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/8/6 3:13, Nikolay Borisov wrote: > > On 5.08.2018 18:02, zhong jiang wrote: >> The err is not used after initalization, So remove it and make >> the function to be void function. >> >> Signed-off-by: zhong jiang > The ret value of this function is not checked by the sole caller > (btrfs_cleanup_one_transaction), however, this does not give you the > right to use a bulk commit message. If you want your future > contributions to be taken seriously please put actual effort in properly > describing your changes. I am sorry for that. I will merge the series into a patch. I will repost. Thanks, zhong jiang > >> --- >> fs/btrfs/disk-io.c | 12 ++++-------- >> 1 file changed, 4 insertions(+), 8 deletions(-) >> >> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c >> index 468365d..34e4926 100644 >> --- a/fs/btrfs/disk-io.c >> +++ b/fs/btrfs/disk-io.c >> @@ -53,8 +53,8 @@ >> static const struct extent_io_ops btree_extent_io_ops; >> static void end_workqueue_fn(struct btrfs_work *work); >> static void btrfs_destroy_ordered_extents(struct btrfs_root *root); >> -static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, >> - struct btrfs_fs_info *fs_info); >> +static void btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, >> + struct btrfs_fs_info *fs_info); >> static void btrfs_destroy_delalloc_inodes(struct btrfs_root *root); >> static int btrfs_destroy_marked_extents(struct btrfs_fs_info *fs_info, >> struct extent_io_tree *dirty_pages, >> @@ -4179,13 +4179,12 @@ static void btrfs_destroy_all_ordered_extents(struct btrfs_fs_info *fs_info) >> spin_unlock(&fs_info->ordered_root_lock); >> } >> >> -static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, >> - struct btrfs_fs_info *fs_info) >> +static void btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, >> + struct btrfs_fs_info *fs_info) >> { >> struct rb_node *node; >> struct btrfs_delayed_ref_root *delayed_refs; >> struct btrfs_delayed_ref_node *ref; >> - int ret = 0; >> >> delayed_refs = &trans->delayed_refs; >> >> @@ -4193,7 +4192,6 @@ static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, >> if (atomic_read(&delayed_refs->num_entries) == 0) { >> spin_unlock(&delayed_refs->lock); >> btrfs_info(fs_info, "delayed_refs has NO entry"); >> - return ret; >> } >> >> while ((node = rb_first(&delayed_refs->href_root)) != NULL) { >> @@ -4247,8 +4245,6 @@ static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, >> } >> >> spin_unlock(&delayed_refs->lock); >> - >> - return ret; >> } >> >> static void btrfs_destroy_delalloc_inodes(struct btrfs_root *root) >> >