linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fsnotify: move declaration of fsnotify_mark_connector_cachep to fsnotify.h
@ 2019-10-15 13:25 Ben Dooks
  2019-10-17  8:32 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2019-10-15 13:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ben Dooks, Jan Kara, Amir Goldstein, linux-fsdevel, linux-kernel

Move fsnotify_mark_connector_cachep to fsnotify.h to properly
share it with the user in mark.c and avoid the following warning
from sparse:

fs/notify/mark.c:82:19: warning: symbol 'fsnotify_mark_connector_cachep' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Jan Kara <jack@suse.cz>
Cc: Amir Goldstein <amir73il@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 fs/notify/fsnotify.c | 2 --
 fs/notify/fsnotify.h | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
index 2ecef6155fc0..3e77b728a22b 100644
--- a/fs/notify/fsnotify.c
+++ b/fs/notify/fsnotify.c
@@ -381,8 +381,6 @@ int fsnotify(struct inode *to_tell, __u32 mask, const void *data, int data_is,
 }
 EXPORT_SYMBOL_GPL(fsnotify);
 
-extern struct kmem_cache *fsnotify_mark_connector_cachep;
-
 static __init int fsnotify_init(void)
 {
 	int ret;
diff --git a/fs/notify/fsnotify.h b/fs/notify/fsnotify.h
index f3462828a0e2..ff2063ec6b0f 100644
--- a/fs/notify/fsnotify.h
+++ b/fs/notify/fsnotify.h
@@ -65,4 +65,6 @@ extern void __fsnotify_update_child_dentry_flags(struct inode *inode);
 extern struct fsnotify_event_holder *fsnotify_alloc_event_holder(void);
 extern void fsnotify_destroy_event_holder(struct fsnotify_event_holder *holder);
 
+extern struct kmem_cache *fsnotify_mark_connector_cachep;
+
 #endif	/* __FS_NOTIFY_FSNOTIFY_H_ */
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fsnotify: move declaration of fsnotify_mark_connector_cachep to fsnotify.h
  2019-10-15 13:25 [PATCH] fsnotify: move declaration of fsnotify_mark_connector_cachep to fsnotify.h Ben Dooks
@ 2019-10-17  8:32 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2019-10-17  8:32 UTC (permalink / raw)
  To: Ben Dooks
  Cc: linux-kernel, Jan Kara, Amir Goldstein, linux-fsdevel, linux-kernel

On Tue 15-10-19 14:25:18, Ben Dooks wrote:
> Move fsnotify_mark_connector_cachep to fsnotify.h to properly
> share it with the user in mark.c and avoid the following warning
> from sparse:
> 
> fs/notify/mark.c:82:19: warning: symbol 'fsnotify_mark_connector_cachep' was not declared. Should it be static?
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>

OK, fair enough. Applied. Thanks for the patch.

								Honza

> ---
> Cc: Jan Kara <jack@suse.cz>
> Cc: Amir Goldstein <amir73il@gmail.com>
> Cc: linux-fsdevel@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
>  fs/notify/fsnotify.c | 2 --
>  fs/notify/fsnotify.h | 2 ++
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
> index 2ecef6155fc0..3e77b728a22b 100644
> --- a/fs/notify/fsnotify.c
> +++ b/fs/notify/fsnotify.c
> @@ -381,8 +381,6 @@ int fsnotify(struct inode *to_tell, __u32 mask, const void *data, int data_is,
>  }
>  EXPORT_SYMBOL_GPL(fsnotify);
>  
> -extern struct kmem_cache *fsnotify_mark_connector_cachep;
> -
>  static __init int fsnotify_init(void)
>  {
>  	int ret;
> diff --git a/fs/notify/fsnotify.h b/fs/notify/fsnotify.h
> index f3462828a0e2..ff2063ec6b0f 100644
> --- a/fs/notify/fsnotify.h
> +++ b/fs/notify/fsnotify.h
> @@ -65,4 +65,6 @@ extern void __fsnotify_update_child_dentry_flags(struct inode *inode);
>  extern struct fsnotify_event_holder *fsnotify_alloc_event_holder(void);
>  extern void fsnotify_destroy_event_holder(struct fsnotify_event_holder *holder);
>  
> +extern struct kmem_cache *fsnotify_mark_connector_cachep;
> +
>  #endif	/* __FS_NOTIFY_FSNOTIFY_H_ */
> -- 
> 2.23.0
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-17  8:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15 13:25 [PATCH] fsnotify: move declaration of fsnotify_mark_connector_cachep to fsnotify.h Ben Dooks
2019-10-17  8:32 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).