From patchwork Mon Sep 7 14:03:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinglong Mee X-Patchwork-Id: 7135581 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 50E909F1CD for ; Mon, 7 Sep 2015 14:03:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 879FA2060B for ; Mon, 7 Sep 2015 14:03:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A608720835 for ; Mon, 7 Sep 2015 14:03:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752187AbbIGODR (ORCPT ); Mon, 7 Sep 2015 10:03:17 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:36367 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751152AbbIGODP (ORCPT ); Mon, 7 Sep 2015 10:03:15 -0400 Received: by padhk3 with SMTP id hk3so13225909pad.3; Mon, 07 Sep 2015 07:03:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=Fl3LPDC58wxNMhwy+bo/yQAtjrj7pCsvgdMpJ6NlX0c=; b=MiOAoCuMjLCJkrbUAKmpcUeOwQnB7L6m259H3dJotznyqat/MdBSqIGrB7t1/OMGdm q9bq0ko2wtZ8WWZX3n7vayFpciJuNufkAxrvYmofKlFwvQEul/7m1m2okjg9tORUaKWr GdEKb4JWRldWK+ljg2nolNjC4+oqIepnnbGFrt5iH6AGUj7akb6aSMh1eKj2eaQ1SiR0 6QDTzQiv3uNkMblgngUuBWzFP9eDhYerVEblkp+l/18bSMeexet24KeyRtpYz8C0OPlg COBRxkOYugOP3jYAQUs9QHAUQ79BPcBMDTwQ7cs/sSb/y6qP+5rBqvUtUS0C9KbI3BPG y7SQ== X-Received: by 10.68.203.66 with SMTP id ko2mr45643436pbc.81.1441634595074; Mon, 07 Sep 2015 07:03:15 -0700 (PDT) Received: from [192.168.99.8] ([104.143.41.79]) by smtp.googlemail.com with ESMTPSA id u10sm12172551pdp.85.2015.09.07.07.03.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Sep 2015 07:03:14 -0700 (PDT) Subject: [PATCH 2/6 v10] fs_pin: Export functions for specific filesystem To: "J. Bruce Fields" , Al Viro References: <55ED9899.9010401@gmail.com> Cc: "linux-nfs@vger.kernel.org" , linux-fsdevel@vger.kernel.org, NeilBrown , Trond Myklebust , kinglongmee@gmail.com From: Kinglong Mee Message-ID: <55ED9918.4040306@gmail.com> Date: Mon, 7 Sep 2015 22:03:04 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55ED9899.9010401@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Exports functions for others who want pin to vfsmount, eg, nfsd's export cache. These are needed for any module to participate in pinning. mnt_pin_kill() and group_pin_kill() are just helper-functions for unmount etc (and are in fs/internal.h) so don't need to be exported. v10, same as v4 add exporting of pin_kill. Signed-off-by: Kinglong Mee --- fs/fs_pin.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/fs_pin.c b/fs/fs_pin.c index b7954a9..b1a9654 100644 --- a/fs/fs_pin.c +++ b/fs/fs_pin.c @@ -33,6 +33,7 @@ int pin_remove(struct fs_pin *pin) spin_unlock_irq(&pin->wait.lock); return ret; } +EXPORT_SYMBOL(pin_remove); void pin_insert_group(struct fs_pin *pin, struct vfsmount *m, struct hlist_head *p) { @@ -42,11 +43,13 @@ void pin_insert_group(struct fs_pin *pin, struct vfsmount *m, struct hlist_head hlist_add_head(&pin->m_list, &real_mount(m)->mnt_pins); spin_unlock(&pin_lock); } +EXPORT_SYMBOL(pin_insert_group); void pin_insert(struct fs_pin *pin, struct vfsmount *m) { pin_insert_group(pin, m, &m->mnt_sb->s_pins); } +EXPORT_SYMBOL(pin_insert); void pin_kill(struct fs_pin *p) { @@ -88,6 +91,7 @@ void pin_kill(struct fs_pin *p) } rcu_read_unlock(); } +EXPORT_SYMBOL(pin_kill); void mnt_pin_kill(struct mount *m) {