diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2005-01-14 23:35:39 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-14 23:35:39 -0800 |
commit | 401494b1615efb1922a380226b0bea3eccb22ff3 (patch) | |
tree | 314c3f5263b12b9ab4b37afb6fe9e31be48c1993 /fs | |
parent | be51a1d918683d3ec3ccdd18ad29637bfa304a23 (diff) | |
download | history-401494b1615efb1922a380226b0bea3eccb22ff3.tar.gz |
[PATCH] ext3/EA: mbcache cleanup
There is no need to export struct mb_cache outside mbcache.c. Move struct
mb_cache to fs/mbcache.c and remove the superfluous struct
mb_cache_entry_index declaration.
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext2/xattr.c | 2 | ||||
-rw-r--r-- | fs/ext3/xattr.c | 2 | ||||
-rw-r--r-- | fs/mbcache.c | 16 |
3 files changed, 17 insertions, 3 deletions
diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c index e78fb7c65212d0..d3cbbdd8b726b2 100644 --- a/fs/ext2/xattr.c +++ b/fs/ext2/xattr.c @@ -1016,7 +1016,7 @@ init_ext2_xattr(void) { ext2_xattr_cache = mb_cache_create("ext2_xattr", NULL, sizeof(struct mb_cache_entry) + - sizeof(struct mb_cache_entry_index), 1, 6); + sizeof(((struct mb_cache_entry *) 0)->e_indexes[0]), 1, 6); if (!ext2_xattr_cache) return -ENOMEM; return 0; diff --git a/fs/ext3/xattr.c b/fs/ext3/xattr.c index 532908a40ad1d8..2fbb2336e7c992 100644 --- a/fs/ext3/xattr.c +++ b/fs/ext3/xattr.c @@ -1080,7 +1080,7 @@ init_ext3_xattr(void) { ext3_xattr_cache = mb_cache_create("ext3_xattr", NULL, sizeof(struct mb_cache_entry) + - sizeof(struct mb_cache_entry_index), 1, 6); + sizeof(((struct mb_cache_entry *) 0)->e_indexes[0]), 1, 6); if (!ext3_xattr_cache) return -ENOMEM; return 0; diff --git a/fs/mbcache.c b/fs/mbcache.c index 988161cb0a77d2..a2c13ebe31eac1 100644 --- a/fs/mbcache.c +++ b/fs/mbcache.c @@ -72,6 +72,20 @@ EXPORT_SYMBOL(mb_cache_entry_find_first); EXPORT_SYMBOL(mb_cache_entry_find_next); #endif +struct mb_cache { + struct list_head c_cache_list; + const char *c_name; + struct mb_cache_op c_op; + atomic_t c_entry_count; + int c_bucket_bits; +#ifndef MB_CACHE_INDEXES_COUNT + int c_indexes_count; +#endif + kmem_cache_t *c_entry_cache; + struct list_head *c_block_hash; + struct list_head *c_indexes_hash[0]; +}; + /* * Global data: list of all mbcache's, lru list, and a spinlock for @@ -229,7 +243,7 @@ mb_cache_create(const char *name, struct mb_cache_op *cache_op, struct mb_cache *cache = NULL; if(entry_size < sizeof(struct mb_cache_entry) + - indexes_count * sizeof(struct mb_cache_entry_index)) + indexes_count * sizeof(((struct mb_cache_entry *) 0)->e_indexes[0])) return NULL; cache = kmalloc(sizeof(struct mb_cache) + |