diff options
| author | Jan Kara <jack@suse.cz> | 2016-02-22 22:35:22 -0500 | 
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2016-02-22 22:35:22 -0500 | 
| commit | 7a2508e1b657cfc7e1371550f88c7a7bc4288f32 (patch) | |
| tree | 00ab4aa4fe9e7d471a01f4d67d70db2b8ac5caff /fs/ext2 | |
| parent | f0c8b46238db9d51ef9ea0858259958d0c601cec (diff) | |
mbcache2: rename to mbcache
Since old mbcache code is gone, let's rename new code to mbcache since
number 2 is now meaningless. This is just a mechanical replacement.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext2')
| -rw-r--r-- | fs/ext2/ext2.h | 4 | ||||
| -rw-r--r-- | fs/ext2/xattr.c | 48 | ||||
| -rw-r--r-- | fs/ext2/xattr.h | 8 | 
3 files changed, 30 insertions, 30 deletions
| diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h index f98ce7e60a0f..170939f379d7 100644 --- a/fs/ext2/ext2.h +++ b/fs/ext2/ext2.h @@ -61,7 +61,7 @@ struct ext2_block_alloc_info {  #define rsv_start rsv_window._rsv_start  #define rsv_end rsv_window._rsv_end -struct mb2_cache; +struct mb_cache;  /*   * second extended-fs super-block data in memory @@ -113,7 +113,7 @@ struct ext2_sb_info {  	 * of the mount options.  	 */  	spinlock_t s_lock; -	struct mb2_cache *s_mb_cache; +	struct mb_cache *s_mb_cache;  };  static inline spinlock_t * diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c index 7162b4869bc3..71d58c2d7a19 100644 --- a/fs/ext2/xattr.c +++ b/fs/ext2/xattr.c @@ -56,7 +56,7 @@  #include <linux/buffer_head.h>  #include <linux/init.h>  #include <linux/slab.h> -#include <linux/mbcache2.h> +#include <linux/mbcache.h>  #include <linux/quotaops.h>  #include <linux/rwsem.h>  #include <linux/security.h> @@ -90,7 +90,7 @@  static int ext2_xattr_set2(struct inode *, struct buffer_head *,  			   struct ext2_xattr_header *); -static int ext2_xattr_cache_insert(struct mb2_cache *, struct buffer_head *); +static int ext2_xattr_cache_insert(struct mb_cache *, struct buffer_head *);  static struct buffer_head *ext2_xattr_cache_find(struct inode *,  						 struct ext2_xattr_header *);  static void ext2_xattr_rehash(struct ext2_xattr_header *, @@ -150,7 +150,7 @@ ext2_xattr_get(struct inode *inode, int name_index, const char *name,  	size_t name_len, size;  	char *end;  	int error; -	struct mb2_cache *ext2_mb_cache = EXT2_SB(inode->i_sb)->s_mb_cache; +	struct mb_cache *ext2_mb_cache = EXT2_SB(inode->i_sb)->s_mb_cache;  	ea_idebug(inode, "name=%d.%s, buffer=%p, buffer_size=%ld",  		  name_index, name, buffer, (long)buffer_size); @@ -246,7 +246,7 @@ ext2_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)  	char *end;  	size_t rest = buffer_size;  	int error; -	struct mb2_cache *ext2_mb_cache = EXT2_SB(inode->i_sb)->s_mb_cache; +	struct mb_cache *ext2_mb_cache = EXT2_SB(inode->i_sb)->s_mb_cache;  	ea_idebug(inode, "buffer=%p, buffer_size=%ld",  		  buffer, (long)buffer_size); @@ -493,8 +493,8 @@ bad_block:		ext2_error(sb, "ext2_xattr_set",  			 * This must happen under buffer lock for  			 * ext2_xattr_set2() to reliably detect modified block  			 */ -			mb2_cache_entry_delete_block(EXT2_SB(sb)->s_mb_cache, -						     hash, bh->b_blocknr); +			mb_cache_entry_delete_block(EXT2_SB(sb)->s_mb_cache, +						    hash, bh->b_blocknr);  			/* keep the buffer locked while modifying it. */  		} else { @@ -627,7 +627,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,  	struct super_block *sb = inode->i_sb;  	struct buffer_head *new_bh = NULL;  	int error; -	struct mb2_cache *ext2_mb_cache = EXT2_SB(sb)->s_mb_cache; +	struct mb_cache *ext2_mb_cache = EXT2_SB(sb)->s_mb_cache;  	if (header) {  		new_bh = ext2_xattr_cache_find(inode, header); @@ -721,8 +721,8 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,  			 * This must happen under buffer lock for  			 * ext2_xattr_set2() to reliably detect freed block  			 */ -			mb2_cache_entry_delete_block(ext2_mb_cache, -						     hash, old_bh->b_blocknr); +			mb_cache_entry_delete_block(ext2_mb_cache, +						    hash, old_bh->b_blocknr);  			/* Free the old block. */  			ea_bdebug(old_bh, "freeing");  			ext2_free_blocks(inode, old_bh->b_blocknr, 1); @@ -786,8 +786,8 @@ ext2_xattr_delete_inode(struct inode *inode)  		 * This must happen under buffer lock for ext2_xattr_set2() to  		 * reliably detect freed block  		 */ -		mb2_cache_entry_delete_block(EXT2_SB(inode->i_sb)->s_mb_cache, -					     hash, bh->b_blocknr); +		mb_cache_entry_delete_block(EXT2_SB(inode->i_sb)->s_mb_cache, +					    hash, bh->b_blocknr);  		ext2_free_blocks(inode, EXT2_I(inode)->i_file_acl, 1);  		get_bh(bh);  		bforget(bh); @@ -818,12 +818,12 @@ cleanup:   * Returns 0, or a negative error number on failure.   */  static int -ext2_xattr_cache_insert(struct mb2_cache *cache, struct buffer_head *bh) +ext2_xattr_cache_insert(struct mb_cache *cache, struct buffer_head *bh)  {  	__u32 hash = le32_to_cpu(HDR(bh)->h_hash);  	int error; -	error = mb2_cache_entry_create(cache, GFP_NOFS, hash, bh->b_blocknr); +	error = mb_cache_entry_create(cache, GFP_NOFS, hash, bh->b_blocknr);  	if (error) {  		if (error == -EBUSY) {  			ea_bdebug(bh, "already in cache (%d cache entries)", @@ -887,14 +887,14 @@ static struct buffer_head *  ext2_xattr_cache_find(struct inode *inode, struct ext2_xattr_header *header)  {  	__u32 hash = le32_to_cpu(header->h_hash); -	struct mb2_cache_entry *ce; -	struct mb2_cache *ext2_mb_cache = EXT2_SB(inode->i_sb)->s_mb_cache; +	struct mb_cache_entry *ce; +	struct mb_cache *ext2_mb_cache = EXT2_SB(inode->i_sb)->s_mb_cache;  	if (!header->h_hash)  		return NULL;  /* never share */  	ea_idebug(inode, "looking for cached blocks [%x]", (int)hash);  again: -	ce = mb2_cache_entry_find_first(ext2_mb_cache, hash); +	ce = mb_cache_entry_find_first(ext2_mb_cache, hash);  	while (ce) {  		struct buffer_head *bh; @@ -915,7 +915,7 @@ again:  			 * entry is still hashed is reliable.  			 */  			if (hlist_bl_unhashed(&ce->e_hash_list)) { -				mb2_cache_entry_put(ext2_mb_cache, ce); +				mb_cache_entry_put(ext2_mb_cache, ce);  				unlock_buffer(bh);  				brelse(bh);  				goto again; @@ -928,14 +928,14 @@ again:  			} else if (!ext2_xattr_cmp(header, HDR(bh))) {  				ea_bdebug(bh, "b_count=%d",  					  atomic_read(&(bh->b_count))); -				mb2_cache_entry_touch(ext2_mb_cache, ce); -				mb2_cache_entry_put(ext2_mb_cache, ce); +				mb_cache_entry_touch(ext2_mb_cache, ce); +				mb_cache_entry_put(ext2_mb_cache, ce);  				return bh;  			}  			unlock_buffer(bh);  			brelse(bh);  		} -		ce = mb2_cache_entry_find_next(ext2_mb_cache, ce); +		ce = mb_cache_entry_find_next(ext2_mb_cache, ce);  	}  	return NULL;  } @@ -1010,13 +1010,13 @@ static void ext2_xattr_rehash(struct ext2_xattr_header *header,  #define HASH_BUCKET_BITS 10 -struct mb2_cache *ext2_xattr_create_cache(void) +struct mb_cache *ext2_xattr_create_cache(void)  { -	return mb2_cache_create(HASH_BUCKET_BITS); +	return mb_cache_create(HASH_BUCKET_BITS);  } -void ext2_xattr_destroy_cache(struct mb2_cache *cache) +void ext2_xattr_destroy_cache(struct mb_cache *cache)  {  	if (cache) -		mb2_cache_destroy(cache); +		mb_cache_destroy(cache);  } diff --git a/fs/ext2/xattr.h b/fs/ext2/xattr.h index 6ea38aa9563a..6f82ab1b00ca 100644 --- a/fs/ext2/xattr.h +++ b/fs/ext2/xattr.h @@ -53,7 +53,7 @@ struct ext2_xattr_entry {  #define EXT2_XATTR_SIZE(size) \  	(((size) + EXT2_XATTR_ROUND) & ~EXT2_XATTR_ROUND) -struct mb2_cache; +struct mb_cache;  # ifdef CONFIG_EXT2_FS_XATTR @@ -68,8 +68,8 @@ extern int ext2_xattr_set(struct inode *, int, const char *, const void *, size_  extern void ext2_xattr_delete_inode(struct inode *); -extern struct mb2_cache *ext2_xattr_create_cache(void); -extern void ext2_xattr_destroy_cache(struct mb2_cache *cache); +extern struct mb_cache *ext2_xattr_create_cache(void); +extern void ext2_xattr_destroy_cache(struct mb_cache *cache);  extern const struct xattr_handler *ext2_xattr_handlers[]; @@ -94,7 +94,7 @@ ext2_xattr_delete_inode(struct inode *inode)  {  } -static inline void ext2_xattr_destroy_cache(struct mb2_cache *cache) +static inline void ext2_xattr_destroy_cache(struct mb_cache *cache)  {  } | 
