summaryrefslogtreecommitdiffstats
path: root/fs/ext4/xattr.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-02-22 22:35:22 -0500
committerTheodore Ts'o <tytso@mit.edu>2016-02-22 22:35:22 -0500
commit7a2508e1b657cfc7e1371550f88c7a7bc4288f32 (patch)
tree00ab4aa4fe9e7d471a01f4d67d70db2b8ac5caff /fs/ext4/xattr.c
parentf0c8b46238db9d51ef9ea0858259958d0c601cec (diff)
downloadop-kernel-dev-7a2508e1b657cfc7e1371550f88c7a7bc4288f32.zip
op-kernel-dev-7a2508e1b657cfc7e1371550f88c7a7bc4288f32.tar.gz
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/ext4/xattr.c')
-rw-r--r--fs/ext4/xattr.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index fe9f8d6..c6af8a7 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -53,7 +53,7 @@
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/slab.h>
-#include <linux/mbcache2.h>
+#include <linux/mbcache.h>
#include <linux/quotaops.h>
#include "ext4_jbd2.h"
#include "ext4.h"
@@ -78,10 +78,10 @@
# define ea_bdebug(bh, fmt, ...) no_printk(fmt, ##__VA_ARGS__)
#endif
-static void ext4_xattr_cache_insert(struct mb2_cache *, struct buffer_head *);
+static void ext4_xattr_cache_insert(struct mb_cache *, struct buffer_head *);
static struct buffer_head *ext4_xattr_cache_find(struct inode *,
struct ext4_xattr_header *,
- struct mb2_cache_entry **);
+ struct mb_cache_entry **);
static void ext4_xattr_rehash(struct ext4_xattr_header *,
struct ext4_xattr_entry *);
static int ext4_xattr_list(struct dentry *dentry, char *buffer,
@@ -276,7 +276,7 @@ ext4_xattr_block_get(struct inode *inode, int name_index, const char *name,
struct ext4_xattr_entry *entry;
size_t size;
int error;
- struct mb2_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode);
+ struct mb_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode);
ea_idebug(inode, "name=%d.%s, buffer=%p, buffer_size=%ld",
name_index, name, buffer, (long)buffer_size);
@@ -428,7 +428,7 @@ ext4_xattr_block_list(struct dentry *dentry, char *buffer, size_t buffer_size)
struct inode *inode = d_inode(dentry);
struct buffer_head *bh = NULL;
int error;
- struct mb2_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode);
+ struct mb_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode);
ea_idebug(inode, "buffer=%p, buffer_size=%ld",
buffer, (long)buffer_size);
@@ -561,8 +561,8 @@ ext4_xattr_release_block(handle_t *handle, struct inode *inode,
* This must happen under buffer lock for
* ext4_xattr_block_set() to reliably detect freed block
*/
- mb2_cache_entry_delete_block(EXT4_GET_MB_CACHE(inode), hash,
- bh->b_blocknr);
+ mb_cache_entry_delete_block(EXT4_GET_MB_CACHE(inode), hash,
+ bh->b_blocknr);
get_bh(bh);
unlock_buffer(bh);
ext4_free_blocks(handle, inode, bh, 0, 1,
@@ -782,9 +782,9 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode,
struct super_block *sb = inode->i_sb;
struct buffer_head *new_bh = NULL;
struct ext4_xattr_search *s = &bs->s;
- struct mb2_cache_entry *ce = NULL;
+ struct mb_cache_entry *ce = NULL;
int error = 0;
- struct mb2_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode);
+ struct mb_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode);
#define header(x) ((struct ext4_xattr_header *)(x))
@@ -805,8 +805,8 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode,
* ext4_xattr_block_set() to reliably detect modified
* block
*/
- mb2_cache_entry_delete_block(ext4_mb_cache, hash,
- bs->bh->b_blocknr);
+ mb_cache_entry_delete_block(ext4_mb_cache, hash,
+ bs->bh->b_blocknr);
ea_bdebug(bs->bh, "modifying in-place");
error = ext4_xattr_set_entry(i, s);
if (!error) {
@@ -904,7 +904,7 @@ inserted:
EXT4_C2B(EXT4_SB(sb),
1));
brelse(new_bh);
- mb2_cache_entry_put(ext4_mb_cache, ce);
+ mb_cache_entry_put(ext4_mb_cache, ce);
ce = NULL;
new_bh = NULL;
goto inserted;
@@ -919,8 +919,8 @@ inserted:
if (error)
goto cleanup_dquot;
}
- mb2_cache_entry_touch(ext4_mb_cache, ce);
- mb2_cache_entry_put(ext4_mb_cache, ce);
+ mb_cache_entry_touch(ext4_mb_cache, ce);
+ mb_cache_entry_put(ext4_mb_cache, ce);
ce = NULL;
} else if (bs->bh && s->base == bs->bh->b_data) {
/* We were modifying this block in-place. */
@@ -985,7 +985,7 @@ getblk_failed:
cleanup:
if (ce)
- mb2_cache_entry_put(ext4_mb_cache, ce);
+ mb_cache_entry_put(ext4_mb_cache, ce);
brelse(new_bh);
if (!(bs->bh && s->base == bs->bh->b_data))
kfree(s->base);
@@ -1546,13 +1546,13 @@ cleanup:
* Returns 0, or a negative error number on failure.
*/
static void
-ext4_xattr_cache_insert(struct mb2_cache *ext4_mb_cache, struct buffer_head *bh)
+ext4_xattr_cache_insert(struct mb_cache *ext4_mb_cache, struct buffer_head *bh)
{
__u32 hash = le32_to_cpu(BHDR(bh)->h_hash);
int error;
- error = mb2_cache_entry_create(ext4_mb_cache, GFP_NOFS, hash,
- bh->b_blocknr);
+ error = mb_cache_entry_create(ext4_mb_cache, GFP_NOFS, hash,
+ bh->b_blocknr);
if (error) {
if (error == -EBUSY)
ea_bdebug(bh, "already in cache");
@@ -1610,16 +1610,16 @@ ext4_xattr_cmp(struct ext4_xattr_header *header1,
*/
static struct buffer_head *
ext4_xattr_cache_find(struct inode *inode, struct ext4_xattr_header *header,
- struct mb2_cache_entry **pce)
+ struct mb_cache_entry **pce)
{
__u32 hash = le32_to_cpu(header->h_hash);
- struct mb2_cache_entry *ce;
- struct mb2_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode);
+ struct mb_cache_entry *ce;
+ struct mb_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode);
if (!header->h_hash)
return NULL; /* never share */
ea_idebug(inode, "looking for cached blocks [%x]", (int)hash);
- ce = mb2_cache_entry_find_first(ext4_mb_cache, hash);
+ ce = mb_cache_entry_find_first(ext4_mb_cache, hash);
while (ce) {
struct buffer_head *bh;
@@ -1638,7 +1638,7 @@ ext4_xattr_cache_find(struct inode *inode, struct ext4_xattr_header *header,
return bh;
}
brelse(bh);
- ce = mb2_cache_entry_find_next(ext4_mb_cache, ce);
+ ce = mb_cache_entry_find_next(ext4_mb_cache, ce);
}
return NULL;
}
@@ -1713,15 +1713,15 @@ static void ext4_xattr_rehash(struct ext4_xattr_header *header,
#define HASH_BUCKET_BITS 10
-struct mb2_cache *
+struct mb_cache *
ext4_xattr_create_cache(void)
{
- return mb2_cache_create(HASH_BUCKET_BITS);
+ return mb_cache_create(HASH_BUCKET_BITS);
}
-void ext4_xattr_destroy_cache(struct mb2_cache *cache)
+void ext4_xattr_destroy_cache(struct mb_cache *cache)
{
if (cache)
- mb2_cache_destroy(cache);
+ mb_cache_destroy(cache);
}
OpenPOWER on IntegriCloud