Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2338236ybg; Fri, 5 Jun 2020 11:18:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkjSGiSlCaFVjCObdSEQGHetO664IQ16xS+QnkbFzgvl2Rgxux4cqvkBttoV6K59Qo7fFC X-Received: by 2002:a50:d78f:: with SMTP id w15mr10827883edi.245.1591381123540; Fri, 05 Jun 2020 11:18:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591381123; cv=none; d=google.com; s=arc-20160816; b=hHbAbO7wbK3/EyrMXxvYWpo4SEFBCN2/Cf7i76owJsVUenhqEeHY6SEMthe3xQ5Qqb EpZYix6NmqSqxvmvJSA5Jk7xVolS/mbAHdixAK7ptCHLjJORoPlaTuVkhnPMtoQEQx+f vLq6kbQojqHnvidt802x0rK5lZ79xx0a4nKXdtmXN08ykZB5Wi0TjV9V8SFCMJO+8sEh yOG6G4WhXG6uwpztuX2GNEXkzxRgZ+NcNLpDueWU4Q44b4Fv+Kq3vUibfh6TwUdOX3zE jeCNuwCnVnGBPErUIoeXBjVlRZStEa9oCstU0rWTS1UqmSA1F2sP4d658QH0f4xn9IX3 oJGQ== 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=PzTrpawMm7O0gb9SBDejxurvPz9n3lKWKd8gdwMZTqc=; b=UX17cIGqQNEfMYQ26OGbBNYXUvSb7/9sB81Wl4AZr1E0r5DGSVAYlR6Xx4wyoUjtPt FqwGTXp5mYJIlmhCCKOXm9aRYdLf7FuAuW8Zv71weF5fA62YBd6G6SYRUNwEdDy/UocM eAmyJnhrkQqrveAqXFZK7dWZVpHV7BTXBn4GSRCDG0l4OYoh1M9yYSV/0N36Z0ZTxZeG It324dmvrafHM6vs1z38Ms18vkka3TwXYWbQ19qU2Cq6zddA86sAgPu54M7NWBNh33E/ iFbk/OusLHGA/FD6ka9UtAN4bBxpI3BHuvYgO/T+kG2d6dtAQ7oqVZXKoa7OEf6wMXw1 gEIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b14si3874753eju.419.2020.06.05.11.18.20; Fri, 05 Jun 2020 11:18:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728031AbgFESPs (ORCPT + 99 others); Fri, 5 Jun 2020 14:15:48 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:44733 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727993AbgFESPs (ORCPT ); Fri, 5 Jun 2020 14:15:48 -0400 Received: by mail-lf1-f67.google.com with SMTP id w15so6324070lfe.11 for ; Fri, 05 Jun 2020 11:15:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PzTrpawMm7O0gb9SBDejxurvPz9n3lKWKd8gdwMZTqc=; b=WCaVSD5i/+hKGKvBtmaugqxlnzMO3TMBtHQeYag8IeCReKonEmrsnL1Y9S1tUofgWb zSytchCsGAmKrDgK+tX7bfRZdfy0Lm9ephsWR1YTv/omK3BHNuBAwcRQYqaanqmrOCXu n2h7C0hBEfrPKqDEq6HvjMyD1XV/gGk6xd2oS1da90ZNx8sMh3WaXMVei7BbVSnE8Mj0 UU9GFAEYJIA2ie0VpGjUSBMmy6cm8djqZNnp75vF13D3wG7d0FOcNLFqmgyh4dxHc66J h/Ji7f/gg+jWLu0CYNyCa83UxVKllrbHDMMNgl9SpuuhywS21kqrvNjcPgTJxUXucBl/ s/kA== X-Gm-Message-State: AOAM530b7IuvWzsIwLWjvbj0bq2WledidHIZKSjf0PYjqxlgSq1Zicsu wrisw4WLOLmJY9ENXCFz68YKk31DdPE= X-Received: by 2002:ac2:5481:: with SMTP id t1mr5967357lfk.102.1591380945576; Fri, 05 Jun 2020 11:15:45 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-38-130.ip.moscow.rt.ru. [37.110.38.130]) by smtp.googlemail.com with ESMTPSA id x69sm1254625lff.19.2020.06.05.11.15.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 11:15:45 -0700 (PDT) From: Denis Efremov To: Jaegeuk Kim , Chao Yu Cc: Denis Efremov , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] f2fs: use kfree() to free sbi in f2fs_fill_super() Date: Fri, 5 Jun 2020 21:15:33 +0300 Message-Id: <20200605181533.73113-2-efremov@linux.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605181533.73113-1-efremov@linux.com> References: <20200605181533.73113-1-efremov@linux.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use kfree() instead of kvfree() to free sbi in f2fs_fill_super() because the memory is allocated with kzalloc() in the function. Fixes: 5222595d093e ("f2fs: use kvmalloc, if kmalloc is failed") Signed-off-by: Denis Efremov --- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 9a3c8eba37e2..39b644c7e9d4 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -3812,7 +3812,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) free_sbi: if (sbi->s_chksum_driver) crypto_free_shash(sbi->s_chksum_driver); - kvfree(sbi); + kfree(sbi); /* give only one another chance */ if (retry_cnt > 0 && skip_recovery) { -- 2.26.2