diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-06-10 05:30:17 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-06-10 05:30:17 -0300 |
commit | d635711daa98be86d4c7fd01499c34f566b54ccb (patch) | |
tree | aa5cc3760a27c3d57146498cb82fa549547de06c /fs/aufs/module.c | |
parent | c91265cd0efb83778f015b4d4b1129bd2cfd075e (diff) |
Linux-libre 4.6.2-gnu
Diffstat (limited to 'fs/aufs/module.c')
-rw-r--r-- | fs/aufs/module.c | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/fs/aufs/module.c b/fs/aufs/module.c index 317fde014..88f8f4123 100644 --- a/fs/aufs/module.c +++ b/fs/aufs/module.c @@ -26,7 +26,28 @@ void *au_kzrealloc(void *p, unsigned int nused, unsigned int new_sz, gfp_t gfp) /* * aufs caches */ -struct kmem_cache *au_cachep[AuCache_Last]; +struct kmem_cache *au_cachep[AuCache_Last] = { + [0] = NULL +}; + +static void au_cache_fin(void) +{ + int i; + + /* + * Make sure all delayed rcu free inodes are flushed before we + * destroy cache. + */ + rcu_barrier(); + + /* excluding AuCache_HNOTIFY */ + BUILD_BUG_ON(AuCache_HNOTIFY + 1 != AuCache_Last); + for (i = 0; i < AuCache_HNOTIFY; i++) { + kmem_cache_destroy(au_cachep[i]); + au_cachep[i] = NULL; + } +} + static int __init au_cache_init(void) { au_cachep[AuCache_DINFO] = AuCacheCtor(au_dinfo, au_di_init_once); @@ -44,27 +65,10 @@ static int __init au_cache_init(void) if (au_cachep[AuCache_DEHSTR]) return 0; + au_cache_fin(); return -ENOMEM; } -static void au_cache_fin(void) -{ - int i; - - /* - * Make sure all delayed rcu free inodes are flushed before we - * destroy cache. - */ - rcu_barrier(); - - /* excluding AuCache_HNOTIFY */ - BUILD_BUG_ON(AuCache_HNOTIFY + 1 != AuCache_Last); - for (i = 0; i < AuCache_HNOTIFY; i++) { - kmem_cache_destroy(au_cachep[i]); - au_cachep[i] = NULL; - } -} - /* ---------------------------------------------------------------------- */ int au_dir_roflags; @@ -77,8 +81,6 @@ int au_dir_roflags; struct au_sphlhead au_sbilist; #endif -struct lock_class_key au_lc_key[AuLcKey_Last]; - /* * functions for module interface. */ |