From patchwork Tue Aug 20 03:13:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 11103143 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1E2E8174A for ; Tue, 20 Aug 2019 07:31:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 06D6D22CF7 for ; Tue, 20 Aug 2019 07:31:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 06D6D22CF7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 013396E5F5; Tue, 20 Aug 2019 07:30:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id F1F7D6E5C0; Tue, 20 Aug 2019 03:14:13 +0000 (UTC) Received: by mail-pf1-x441.google.com with SMTP id o70so2439912pfg.5; Mon, 19 Aug 2019 20:14:13 -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:mime-version :content-transfer-encoding; bh=mQPEFXG5NaLlLl7jM/5xQz0mHSvpnN8IjBBA+T4iEGI=; b=nmcSaf49IHgXVzYTXtqyG6hvELIpu+KnodTasZFy7oWSTEPwY6sLxjBpbpqNLX038O E4DTfFD9/OZY6e4S2Cx6NUGeLx28OgLTtfY0BAxietRzMfDjwIdHlX6Onilm4X0EunGD 0WuPGgz78QF1i85v2r0651jrUHsRLhNXaRyF11atLCYU4atVChnc58Za5Z53EpOFqw5Q yMQh+kEP8N1CHnpTPYU85w9afZ3nCuf+UIHdB/zTr7AnSRySIlba8kX7eMzZGFGSQWdj 1/5BTN/WLpaZcvZKuEHBYC0BhD/rKeDS8NngSuTc0IfEF6PDLweWjJkChcdpwYDZLBL5 BXiQ== X-Gm-Message-State: APjAAAWHRrnb62W8I1G174lWXy0Lh5ouKDUL4wLtbrCgZ4EeaEXgXqAr djdzBdtxJU504NhuMwFYWCE= X-Google-Smtp-Source: APXvYqzTyrvm8j5S2KopDYOUCwWLbYjSfCB/F2McmAtf80ofjPkVHJavNFhSAmrdz0MFXxcGSNfoFA== X-Received: by 2002:aa7:8dd2:: with SMTP id j18mr27375110pfr.88.1566270853683; Mon, 19 Aug 2019 20:14:13 -0700 (PDT) Received: from localhost.localdomain ([175.223.16.125]) by smtp.gmail.com with ESMTPSA id y16sm22979651pfc.36.2019.08.19.20.14.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 20:14:12 -0700 (PDT) From: Sergey Senozhatsky X-Google-Original-From: Sergey Senozhatsky To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Chris Wilson , Alexander Viro , David Howells , Christoph Hellwig Subject: [PATCHv2 1/2] fs: export put_filesystem() Date: Tue, 20 Aug 2019 12:13:58 +0900 Message-Id: <20190820031359.11717-1-sergey.senozhatsky@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 20 Aug 2019 07:30:56 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mQPEFXG5NaLlLl7jM/5xQz0mHSvpnN8IjBBA+T4iEGI=; b=iMbBm1t2dofey1/BjH/Eg1cEpum8t/m7wE9e1cyHBXL7q/vtT2D5LiAGnel49NAZs1 5xEy/yW7jwaNHsZBbu4hLW12egjPaBs8gj+opFvWOgSEI+IoO5M7FnuLR62+5rwGctpd fAF/+nTqyGVGFDiMY1Q8FoP4W943aNDB1YdRAIEnT8fxcz2Z1GmDOaHMe3odEyqYu6SF iDTmdXEByZOoQtpCS3yJj5EgnHmdAEboGvyme0iHZcnR3FQfO0LrJ6wNChu9iZhNeOwu u6nxe7f2/gL0cvp2pSMeLllYTe/nkEWWN77pGqjtqyGV4QCOPp3ybAxjRxkwm0Xsht/8 lH4A== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fsdevel@vger.kernel.org, Sergey Senozhatsky , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Modules, e.g. i915, can use exported get_fs_type(), but are unable to put_filesystem(). Export it and let modules to decrement file systems' reference counters. Signed-off-by: Sergey Senozhatsky --- fs/filesystems.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/filesystems.c b/fs/filesystems.c index 9135646e41ac..02669839b584 100644 --- a/fs/filesystems.c +++ b/fs/filesystems.c @@ -45,6 +45,7 @@ void put_filesystem(struct file_system_type *fs) { module_put(fs->owner); } +EXPORT_SYMBOL(put_filesystem); static struct file_system_type **find_filesystem(const char *name, unsigned len) { From patchwork Tue Aug 20 03:13:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 11103151 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37C0B112C for ; Tue, 20 Aug 2019 07:31:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 20C8922CF9 for ; Tue, 20 Aug 2019 07:31:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20C8922CF9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 399AB6E60A; Tue, 20 Aug 2019 07:30:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by gabe.freedesktop.org (Postfix) with ESMTPS id 31CED6E5C0; Tue, 20 Aug 2019 03:14:25 +0000 (UTC) Received: by mail-pf1-x432.google.com with SMTP id w2so2441766pfi.3; Mon, 19 Aug 2019 20:14:25 -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=K4of2PnnHi951vdKUeK2K+sxyHzoe/hoiqAy/eVEirM=; b=hhOT5wK8dCRMhIqvUTqf1ob1Rb6kHKEYRRVPPNxQfU96t/u+u/87lw0tFIQzmEdEAi azYhci2Z9HEyOW1/PJiMvnKcBaGQ/2S8nDlrg1I6657YAKM7MtAKgc0pMxYI5PFZ53YQ I6CFQC0WxhkLm6wPSa96npdKgN66RU6KoCL0PwOJZ0uYW09o5dQHHgelzRFYj1KLoVJA RQrF/FmJ0ag+NEGAL6GucolKSL5RbkGzkjJE9gQpewp1oRf+uFRmtW8q/Ng2JhNGCmIF fNAHRh2YRACJ6xlrLoX+B6A+/H3x2DOI0CDmtZa9fXyl+DdN5cVeG0xFhYFSeqFYbfIk cm+g== X-Gm-Message-State: APjAAAW0Tz7cuI41h7AHr5FCrzL2X8wKbJwyAGnB1i5/EDyzKHc9UKr5 4hdiRk1OMHDHWFEKUOG/2qc= X-Google-Smtp-Source: APXvYqz9a/3SyryqSwUMcB7DFqYmpTTlG+WpK9xSoJbY4pJWLd2w/rkmZkHdR5wOYLwXn7nrZmj2Kg== X-Received: by 2002:a65:52c5:: with SMTP id z5mr22933012pgp.118.1566270864801; Mon, 19 Aug 2019 20:14:24 -0700 (PDT) Received: from localhost.localdomain ([175.223.16.125]) by smtp.gmail.com with ESMTPSA id y16sm22979651pfc.36.2019.08.19.20.14.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 20:14:24 -0700 (PDT) From: Sergey Senozhatsky X-Google-Original-From: Sergey Senozhatsky To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Chris Wilson , Alexander Viro , David Howells , Christoph Hellwig Subject: [PATCHv2 2/2] i915: do not leak module ref counter Date: Tue, 20 Aug 2019 12:13:59 +0900 Message-Id: <20190820031359.11717-2-sergey.senozhatsky@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190820031359.11717-1-sergey.senozhatsky@gmail.com> References: <20190820031359.11717-1-sergey.senozhatsky@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 20 Aug 2019 07:30:56 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K4of2PnnHi951vdKUeK2K+sxyHzoe/hoiqAy/eVEirM=; b=qnvx2lkhaPKZ2PX5FAyasqmmW2NoOyz64n3FGHz179t53oPUjxZUlnwbnIk+4Dlg3D EzguXrsYM8ygUZVVDCwCFcdo/++fB2CYHoLBUbn3WUEqKpQhN1+UTg5OpFs1B18ai88u 3v1SzY7sxLZQFdWWUYgFwNh3giTFWs3V9tuVqjLxgZTxsXGT5wbirhQd2czpspT5FoNL ibmdQmM2egXzqR1sqZU/Hu66LpSBAIosjOCr6WLfQJtNJKEMZPuz2fDM1qzHWI7nr6nU sT+WvHPw5Y5bSv8PuGW2oXUaxI3njyq7YSYoplv4frx38erw+my9Z7S0Lh6ELbGgpW8q brug== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fsdevel@vger.kernel.org, Sergey Senozhatsky , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Always put_filesystem() in i915_gemfs_init(). Signed-off-by: Sergey Senozhatsky --- - v2: rebased (i915 does not remount gemfs anymore) drivers/gpu/drm/i915/gem/i915_gemfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gemfs.c b/drivers/gpu/drm/i915/gem/i915_gemfs.c index 5e6e8c91ab38..0a398e1e45fc 100644 --- a/drivers/gpu/drm/i915/gem/i915_gemfs.c +++ b/drivers/gpu/drm/i915/gem/i915_gemfs.c @@ -30,6 +30,7 @@ int i915_gemfs_init(struct drm_i915_private *i915) */ gemfs = kern_mount(type); + put_filesystem(type); if (IS_ERR(gemfs)) return PTR_ERR(gemfs);