dcache.c (6a9b88204cb00da2140afda27848b5d17a7402a3) | dcache.c (e8f9e5b780b0406ab81add72f1a05583ae5d40ac) |
---|---|
1/* 2 * fs/dcache.c 3 * 4 * Complete reimplementation 5 * (C) 1997 Thomas Schoebel-Theuer, 6 * with heavy changes by Linus Torvalds 7 */ 8 --- 3513 unchanged lines hidden (view full) --- 3522 result = true; 3523 else 3524 result = false; 3525 rcu_read_unlock(); 3526 } while (read_seqretry(&rename_lock, seq)); 3527 3528 return result; 3529} | 1/* 2 * fs/dcache.c 3 * 4 * Complete reimplementation 5 * (C) 1997 Thomas Schoebel-Theuer, 6 * with heavy changes by Linus Torvalds 7 */ 8 --- 3513 unchanged lines hidden (view full) --- 3522 result = true; 3523 else 3524 result = false; 3525 rcu_read_unlock(); 3526 } while (read_seqretry(&rename_lock, seq)); 3527 3528 return result; 3529} |
3530EXPORT_SYMBOL(is_subdir); |
|
3530 3531static enum d_walk_ret d_genocide_kill(void *data, struct dentry *dentry) 3532{ 3533 struct dentry *root = data; 3534 if (dentry != root) { 3535 if (d_unhashed(dentry) || !dentry->d_inode) 3536 return D_WALK_SKIP; 3537 --- 58 unchanged lines hidden (view full) --- 3596 3597static void __init dcache_init(void) 3598{ 3599 /* 3600 * A constructor could be added for stable state like the lists, 3601 * but it is probably not worth it because of the cache nature 3602 * of the dcache. 3603 */ | 3531 3532static enum d_walk_ret d_genocide_kill(void *data, struct dentry *dentry) 3533{ 3534 struct dentry *root = data; 3535 if (dentry != root) { 3536 if (d_unhashed(dentry) || !dentry->d_inode) 3537 return D_WALK_SKIP; 3538 --- 58 unchanged lines hidden (view full) --- 3597 3598static void __init dcache_init(void) 3599{ 3600 /* 3601 * A constructor could be added for stable state like the lists, 3602 * but it is probably not worth it because of the cache nature 3603 * of the dcache. 3604 */ |
3604 dentry_cache = KMEM_CACHE_USERCOPY(dentry, 3605 SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|SLAB_MEM_SPREAD|SLAB_ACCOUNT, 3606 d_iname); | 3605 dentry_cache = KMEM_CACHE(dentry, 3606 SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|SLAB_MEM_SPREAD|SLAB_ACCOUNT); |
3607 3608 /* Hash may have been set up in dcache_init_early */ 3609 if (!hashdist) 3610 return; 3611 3612 dentry_hashtable = 3613 alloc_large_system_hash("Dentry cache", 3614 sizeof(struct hlist_bl_head), --- 20 unchanged lines hidden (view full) --- 3635 INIT_HLIST_BL_HEAD(&in_lookup_hashtable[i]); 3636 3637 dcache_init_early(); 3638 inode_init_early(); 3639} 3640 3641void __init vfs_caches_init(void) 3642{ | 3607 3608 /* Hash may have been set up in dcache_init_early */ 3609 if (!hashdist) 3610 return; 3611 3612 dentry_hashtable = 3613 alloc_large_system_hash("Dentry cache", 3614 sizeof(struct hlist_bl_head), --- 20 unchanged lines hidden (view full) --- 3635 INIT_HLIST_BL_HEAD(&in_lookup_hashtable[i]); 3636 3637 dcache_init_early(); 3638 inode_init_early(); 3639} 3640 3641void __init vfs_caches_init(void) 3642{ |
3643 names_cachep = kmem_cache_create_usercopy("names_cache", PATH_MAX, 0, 3644 SLAB_HWCACHE_ALIGN|SLAB_PANIC, 0, PATH_MAX, NULL); | 3643 names_cachep = kmem_cache_create("names_cache", PATH_MAX, 0, 3644 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
3645 3646 dcache_init(); 3647 inode_init(); 3648 files_init(); 3649 files_maxfiles_init(); 3650 mnt_init(); 3651 bdev_cache_init(); 3652 chrdev_init(); 3653} | 3645 3646 dcache_init(); 3647 inode_init(); 3648 files_init(); 3649 files_maxfiles_init(); 3650 mnt_init(); 3651 bdev_cache_init(); 3652 chrdev_init(); 3653} |