Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp389182ybx; Wed, 6 Nov 2019 02:16:18 -0800 (PST) X-Google-Smtp-Source: APXvYqytIFCPaBD8NrJkjWTTT9GKlD0Heew4K8MaUtSr1qdaoKpCM8MQN3iAeAVEXTIS3bCNb6q7 X-Received: by 2002:a05:6402:28d:: with SMTP id l13mr1721879edv.286.1573035378608; Wed, 06 Nov 2019 02:16:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573035378; cv=none; d=google.com; s=arc-20160816; b=mQgP2onlq/aG7zDBd6Oqlit/osFIkyiawjHxG27ZAaqSaNXkdzj9HMDadPcpXoF7kq 8uPYq/zL6TgrNbH0gBVimb0TSIob/VTcqy8oECLdJrC2e2+olcxll6BXQx7SHBZ1c2ug rGtu96wfzbl+3xptT2L5dGTcf6U0IHgsNN4piy+8ykFOunj3dp43eO5T70Vahc1OwoKa h6f8WSMkiliivYG+9it0yYLT6twLW9XksLNedYW+3MrXuza272JUHrsQxnd+OB+sHKw5 ZEuBm2pCYlxZwMYmb9GA5Ha94lCrbUpUOzXoBkkBBLpRVhUIHeUhFMSxRTckwvweZ0rC fWnA== 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 :dkim-signature; bh=MNoK5utgfrXbFUwG46SwmYI7lRkrGCQAE8BloN9BUhY=; b=KrYDysTHc8CTu+Zvsi2W57TU2uWd6LoHl8qVahppVCtz1TywZje+T2bj+ClZdoyfb0 4Ojsmklw1hUwnByCJugu9FrYQfdxvk5UubxL4iqg0j/s4KHvZQy8n+afIDdTTiA6MLIL lPQfdCxpD09qqwFwgEk0b30YnzvXdLNVpc60Q/eQKo+IIaKzFnDycwwjKSjFvT5ddwB+ a/CtxWYXtlKuxnS5HWxzNqGATLM5Bw4Iki01grPywjn0ofGYwcYPskBKOBgk/2a2gfcm aMpfZ4GFDUh04bJmAFy0RDRczooExBu81WWcnDVmoPWFs8Q1KZDbCDeRAI4B4O8hflKi RCKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Uvm5imEA; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (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 o22si4841972ejr.397.2019.11.06.02.15.54; Wed, 06 Nov 2019 02:16:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Uvm5imEA; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731390AbfKFKPp (ORCPT + 99 others); Wed, 6 Nov 2019 05:15:45 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:58303 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731322AbfKFKPo (ORCPT ); Wed, 6 Nov 2019 05:15:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573035343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MNoK5utgfrXbFUwG46SwmYI7lRkrGCQAE8BloN9BUhY=; b=Uvm5imEAXF97mYGb4TbxKSySbgUi5zKwHY2H2zixOX9Eb3KoUhUhLSWJQdIAHdlDyfCG9L Ccu3BXuTcgVfTGEBaNQrxKAf59lsoD1LieBwc7QZWUh0msu5vZ23mx8/LqOH5zR1tt4hTf 8JBcjckBlTDL1umN/aAoukLw9sAdQFM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-331-MZh5LyMhNHWuhur_VTpx0w-1; Wed, 06 Nov 2019 05:15:40 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 271BB107ACC3; Wed, 6 Nov 2019 10:15:39 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.205.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1860E19481; Wed, 6 Nov 2019 10:15:37 +0000 (UTC) From: Lukas Czerner To: linux-ext4@vger.kernel.org Cc: Theodore Ts'o , David Howells , Al Viro Subject: [PATCH 14/17] ext4: add ext4_fc_free for the new mount API Date: Wed, 6 Nov 2019 11:14:54 +0100 Message-Id: <20191106101457.11237-15-lczerner@redhat.com> In-Reply-To: <20191106101457.11237-1-lczerner@redhat.com> References: <20191106101457.11237-1-lczerner@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: MZh5LyMhNHWuhur_VTpx0w-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Signed-off-by: Lukas Czerner --- fs/ext4/super.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 471fe7b6ad9e..815f86f1e047 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -95,6 +95,7 @@ static void ext4_apply_options(struct fs_context *fc, str= uct super_block *sb); static int ext4_parse_param(struct fs_context *fc, struct fs_parameter *pa= ram); static int ext4_get_tree(struct fs_context *fc); static int ext4_reconfigure(struct fs_context *fc); +static void ext4_fc_free(struct fs_context *fc); =20 /* * Lock ordering @@ -128,6 +129,7 @@ static const struct fs_context_operations ext4_context_= ops =3D { =09.parse_param=09=3D ext4_parse_param, =09.get_tree=09=3D ext4_get_tree, =09.reconfigure=09=3D ext4_reconfigure, +=09.free=09=09=3D ext4_fc_free, }; =20 #if !defined(CONFIG_EXT2_FS) && !defined(CONFIG_EXT2_FS_MODULE) && defined= (CONFIG_EXT4_USE_FOR_EXT2) @@ -1872,6 +1874,19 @@ struct ext4_fs_context { =09ext4_fsblk_t=09s_sb_block; }; =20 +static void ext4_fc_free(struct fs_context *fc) +{ +=09struct ext4_fs_context *ctx =3D fc->fs_private; +=09int i; + +=09if (!ctx) +=09=09return; + +=09for (i =3D 0; i < EXT4_MAXQUOTAS; i++) +=09=09kfree(ctx->s_qf_names[i]); +=09kfree(ctx); +} + #ifdef CONFIG_QUOTA /* * Note the name of the specified quota file. --=20 2.21.0