From patchwork Tue Aug 18 07:19:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinglong Mee X-Patchwork-Id: 7028741 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7F50AC05AC for ; Tue, 18 Aug 2015 07:19:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A77AF205DB for ; Tue, 18 Aug 2015 07:19:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D008F2078B for ; Tue, 18 Aug 2015 07:19:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751182AbbHRHTq (ORCPT ); Tue, 18 Aug 2015 03:19:46 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:34491 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750890AbbHRHTp (ORCPT ); Tue, 18 Aug 2015 03:19:45 -0400 Received: by pdbfa8 with SMTP id fa8so64916838pdb.1; Tue, 18 Aug 2015 00:19:45 -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=3EZk3bUNOWTLi3wAkGx+hUKdMojvbexLPn1d/PQ8jxk=; b=idOA0mCb9CudT4m6n4/P7rFdc9vqQnZPa2SuwE4vAFKJ8ycCj6PRR2087STA32D9EW LdvQHcgDATPmeuUbBu7rQFqg6VvqihS93cCeaT8+qN2FE0uGpg6uqOixPVwg9LioQcJ8 GydhmFtm0nfVqmM2XE0U/FxiORHijFNbzqd3YBWwQRso0VR/tRi3c9dxaMAF+e0a8PgX 3W1IbNjSitopj7+nmXDFr1abtpf+ysnHW87s1+wK/ZCQy0Dl4Waf5hyxgEBC1NUEgijb Xi15QJ96P5cYHk5rudseypcxzRhgKXBc6dGOZrNRmN6JL5HgCTYgF0LAtge0o4mIuoMB elDQ== X-Received: by 10.70.92.47 with SMTP id cj15mr10244551pdb.37.1439882385340; Tue, 18 Aug 2015 00:19:45 -0700 (PDT) Received: from [192.168.99.18] ([104.143.41.79]) by smtp.googlemail.com with ESMTPSA id p9sm16952628pds.92.2015.08.18.00.19.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Aug 2015 00:19:44 -0700 (PDT) Subject: [PATCH 2/6] fs_pin: Export functions for specific filesystem To: "J. Bruce Fields" , Al Viro References: <55D2DBF6.3010406@gmail.com> Cc: "linux-nfs@vger.kernel.org" , linux-fsdevel@vger.kernel.org, NeilBrown , Trond Myklebust , kinglongmee@gmail.com From: Kinglong Mee Message-ID: <55D2DC84.8050801@gmail.com> Date: Tue, 18 Aug 2015 15:19:32 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55D2DBF6.3010406@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=-7.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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. v9, 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) {