diff mbox

[2/9,v8] fs_pin: Export functions for specific filesystem

Message ID 55B5A06D.1070506@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kinglong Mee July 27, 2015, 3:07 a.m. UTC
Exports functions for others who want pin to vfsmount,
eg, nfsd's export cache.

v8, same as v4
add exporting of pin_kill.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
 fs/fs_pin.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

NeilBrown July 29, 2015, 12:30 a.m. UTC | #1
On Mon, 27 Jul 2015 11:07:25 +0800 Kinglong Mee <kinglongmee@gmail.com>
wrote:

> Exports functions for others who want pin to vfsmount,
> eg, nfsd's export cache.
> 
> v8, same as v4
> add exporting of pin_kill.
> 
> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>

Reviewed-by: NeilBrown <neilb@suse.com>

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.

Thanks,
NeilBrown

> ---
>  fs/fs_pin.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/fs/fs_pin.c b/fs/fs_pin.c
> index 611b540..a1a4eb2 100644
> --- a/fs/fs_pin.c
> +++ b/fs/fs_pin.c
> @@ -17,6 +17,7 @@ void pin_remove(struct fs_pin *pin)
>  	wake_up_locked(&pin->wait);
>  	spin_unlock_irq(&pin->wait.lock);
>  }
> +EXPORT_SYMBOL(pin_remove);
>  
>  void pin_insert_group(struct fs_pin *pin, struct vfsmount *m, struct hlist_head *p)
>  {
> @@ -26,11 +27,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)
>  {
> @@ -72,6 +75,7 @@ void pin_kill(struct fs_pin *p)
>  	}
>  	rcu_read_unlock();
>  }
> +EXPORT_SYMBOL(pin_kill);
>  
>  void mnt_pin_kill(struct mount *m)
>  {

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kinglong Mee July 30, 2015, 12:31 p.m. UTC | #2
On 7/29/2015 08:30, NeilBrown wrote:
> On Mon, 27 Jul 2015 11:07:25 +0800 Kinglong Mee <kinglongmee@gmail.com>
> wrote:
> 
>> Exports functions for others who want pin to vfsmount,
>> eg, nfsd's export cache.
>>
>> v8, same as v4
>> add exporting of pin_kill.
>>
>> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
> 
> Reviewed-by: NeilBrown <neilb@suse.com>
> 
> 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.

Yes, thanks for your comments.
It's better adding the comments to the change-log.

thanks,
Kinglong Mee

> 
> Thanks,
> NeilBrown
> 
>> ---
>>  fs/fs_pin.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/fs/fs_pin.c b/fs/fs_pin.c
>> index 611b540..a1a4eb2 100644
>> --- a/fs/fs_pin.c
>> +++ b/fs/fs_pin.c
>> @@ -17,6 +17,7 @@ void pin_remove(struct fs_pin *pin)
>>  	wake_up_locked(&pin->wait);
>>  	spin_unlock_irq(&pin->wait.lock);
>>  }
>> +EXPORT_SYMBOL(pin_remove);
>>  
>>  void pin_insert_group(struct fs_pin *pin, struct vfsmount *m, struct hlist_head *p)
>>  {
>> @@ -26,11 +27,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)
>>  {
>> @@ -72,6 +75,7 @@ void pin_kill(struct fs_pin *p)
>>  	}
>>  	rcu_read_unlock();
>>  }
>> +EXPORT_SYMBOL(pin_kill);
>>  
>>  void mnt_pin_kill(struct mount *m)
>>  {
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/fs_pin.c b/fs/fs_pin.c
index 611b540..a1a4eb2 100644
--- a/fs/fs_pin.c
+++ b/fs/fs_pin.c
@@ -17,6 +17,7 @@  void pin_remove(struct fs_pin *pin)
 	wake_up_locked(&pin->wait);
 	spin_unlock_irq(&pin->wait.lock);
 }
+EXPORT_SYMBOL(pin_remove);
 
 void pin_insert_group(struct fs_pin *pin, struct vfsmount *m, struct hlist_head *p)
 {
@@ -26,11 +27,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)
 {
@@ -72,6 +75,7 @@  void pin_kill(struct fs_pin *p)
 	}
 	rcu_read_unlock();
 }
+EXPORT_SYMBOL(pin_kill);
 
 void mnt_pin_kill(struct mount *m)
 {