Return-Path: 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 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 MIME-Version: 1.0 In-Reply-To: <55D2DBF6.3010406@gmail.com> Content-Type: text/plain; charset=utf-8 Sender: linux-nfs-owner@vger.kernel.org List-ID: 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) { -- 2.4.3