Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1459511ybe; Thu, 5 Sep 2019 16:05:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRPs50/STZGEXTLzIGYMNYClrCeljMcYdgqJr3dKJpB+T/iPxGbMdf8jcusePe79go87m4 X-Received: by 2002:a63:484a:: with SMTP id x10mr5359091pgk.430.1567724758719; Thu, 05 Sep 2019 16:05:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567724758; cv=none; d=google.com; s=arc-20160816; b=AXwSGVL9v85HlLv47i7+AxknwwFI9oJh9tdtHqMNZgqkQ7o5Q2nAvAa1jWM/dSByuU 1pAWFkDaWWZN8KHKtvpM5xhSAJnZMh7bF2jUcY9GdbthVm8HsfOo92NNkqaW1XY8sFml YRve8YdC70G2R39ImnZG3c7j4Ks7zL4d1dQCQ27uR2L+8SHAV5GkJyKMLNZzjZbbJOHx V2ScazLyHuiEw9jZ+cpgs2X7B0LJ8nKy78V2AToGgDjaqL3j6h4nXKD9x8Yxh3q9ZeaS +S8CFk0CbfKG8l0OG3BJOWszDDmgHwOXxKUvanmC18F/C6rfLdrVTpzS6dlBCG4BqYSH Ct5g== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=3fIdQPkBCzRqkkCYBIV0GUcnzNeVN8VJeQMIkrpUE2A=; b=ck0YlflGMPqrlqa236EQmHzxlTI3Kz1g6Ax9uIsj4ZxMZeb0zAm5bMa5IStdoXHivY ss1h0E/iWL1TYnYxDZMvv4QiK1AWxfaxWE/QpaW8QKNc0k0gqzxZBIL6dkUGO4nqo09D YnomPZ4bRxaUXfW2d91W3PJJ9oPKDdisaxlOwA4qHwbI0aFmb1WVNQlnr1GtEYHxQfzb bcP+YVyaLtLQ1RWeRzSUcmGS8WDcJqlHvg5gPVB8WLl8B5uX3kcWxwsoNPRBtEmOw8yI VXk7j7wPl+qqJCAyQGZW/9PPEb6wRpX/wUA5bPoPL5xskob0LvhVp3Is3ESJ8xKZnCoo p6uw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z20si3293553plo.159.2019.09.05.16.05.43; Thu, 05 Sep 2019 16:05:58 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403926AbfIETuV (ORCPT + 99 others); Thu, 5 Sep 2019 15:50:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38614 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388286AbfIETt1 (ORCPT ); Thu, 5 Sep 2019 15:49:27 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E4CCC7FDCD; Thu, 5 Sep 2019 19:49:26 +0000 (UTC) Received: from horse.redhat.com (unknown [10.18.25.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id BF6E01001B00; Thu, 5 Sep 2019 19:49:26 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id 0F63D2253A4; Thu, 5 Sep 2019 15:49:18 -0400 (EDT) From: Vivek Goyal To: linux-fsdevel@vger.kernel.org, virtualization@lists.linux-foundation.org, miklos@szeredi.hu Cc: linux-kernel@vger.kernel.org, virtio-fs@redhat.com, vgoyal@redhat.com, stefanha@redhat.com, dgilbert@redhat.com, mst@redhat.com Subject: [PATCH 12/18] virtiofs: Use virtio_fs_free_devs() in error path Date: Thu, 5 Sep 2019 15:48:53 -0400 Message-Id: <20190905194859.16219-13-vgoyal@redhat.com> In-Reply-To: <20190905194859.16219-1-vgoyal@redhat.com> References: <20190905194859.16219-1-vgoyal@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 05 Sep 2019 19:49:26 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We already have an helper to cleanup fuse devices. Use that instead of duplicating the code. Signed-off-by: Vivek Goyal --- fs/fuse/virtio_fs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c index a76bd5a04521..40259368a6bd 100644 --- a/fs/fuse/virtio_fs.c +++ b/fs/fuse/virtio_fs.c @@ -999,8 +999,7 @@ static int virtio_fs_fill_super(struct super_block *sb) err_free_init_req: fuse_request_free(init_req); err_free_fuse_devs: - for (i = 0; i < fs->nvqs; i++) - fuse_dev_free(fs->vqs[i].fud); + virtio_fs_free_devs(fs); err: return err; } -- 2.20.1