]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging/lustre/osc: extern declare osc_caches in a header
authorOleg Drokin <green@linuxhacker.ru>
Wed, 7 Dec 2016 22:41:31 +0000 (17:41 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jan 2017 14:01:20 +0000 (15:01 +0100)
This avoids frowned upon extern in the C file, and also
shuts down a sparse warning of
drivers/staging/lustre/lustre/osc/osc_dev.c:55:22: warning: symbol 'osc_caches' was not declared. Should it be static?

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/osc/osc_internal.h
drivers/staging/lustre/lustre/osc/osc_request.c

index 688783dcc1e4d7991f861ca623bcce98eee13409..5cce82b574408deee1079fa39613bdb885755086 100644 (file)
@@ -181,6 +181,8 @@ static inline struct osc_device *obd2osc_dev(const struct obd_device *d)
        return container_of0(d->obd_lu_dev, struct osc_device, od_cl.cd_lu_dev);
 }
 
+extern struct lu_kmem_descr osc_caches[];
+
 extern struct kmem_cache *osc_quota_kmem;
 struct osc_quota_info {
        /** linkage for quota hash table */
index 7143564ae7e721545fceaa3bc65b7d79508083dc..f69129711d2dd05471a6198e74d13f8bbdb5dda0 100644 (file)
@@ -2766,8 +2766,6 @@ static struct obd_ops osc_obd_ops = {
        .quotactl       = osc_quotactl,
 };
 
-extern struct lu_kmem_descr osc_caches[];
-
 static int __init osc_init(void)
 {
        struct lprocfs_static_vars lvars = { NULL };