ocfs2: Remove inode from ocfs2_xattr_bucket_get_name_value.
In ocfs2_xattr_bucket_get_name_value, actually we only use super_block. So use it. Signed-off-by: Tao Ma <tao.ma@oracle.com>
This commit is contained in:
parent
492a8a33e1
commit
fd68a894fc
|
@ -140,7 +140,7 @@ struct ocfs2_xattr_search {
|
||||||
int not_found;
|
int not_found;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ocfs2_xattr_bucket_get_name_value(struct inode *inode,
|
static int ocfs2_xattr_bucket_get_name_value(struct super_block *sb,
|
||||||
struct ocfs2_xattr_header *xh,
|
struct ocfs2_xattr_header *xh,
|
||||||
int index,
|
int index,
|
||||||
int *block_off,
|
int *block_off,
|
||||||
|
@ -1101,7 +1101,7 @@ static int ocfs2_xattr_block_get(struct inode *inode,
|
||||||
i = xs->here - xs->header->xh_entries;
|
i = xs->here - xs->header->xh_entries;
|
||||||
|
|
||||||
if (le16_to_cpu(xb->xb_flags) & OCFS2_XATTR_INDEXED) {
|
if (le16_to_cpu(xb->xb_flags) & OCFS2_XATTR_INDEXED) {
|
||||||
ret = ocfs2_xattr_bucket_get_name_value(inode,
|
ret = ocfs2_xattr_bucket_get_name_value(inode->i_sb,
|
||||||
bucket_xh(xs->bucket),
|
bucket_xh(xs->bucket),
|
||||||
i,
|
i,
|
||||||
&block_off,
|
&block_off,
|
||||||
|
@ -2297,7 +2297,7 @@ static int ocfs2_calc_xattr_set_need(struct inode *inode,
|
||||||
old_in_xb = 1;
|
old_in_xb = 1;
|
||||||
|
|
||||||
if (le16_to_cpu(xb->xb_flags) & OCFS2_XATTR_INDEXED) {
|
if (le16_to_cpu(xb->xb_flags) & OCFS2_XATTR_INDEXED) {
|
||||||
ret = ocfs2_xattr_bucket_get_name_value(inode,
|
ret = ocfs2_xattr_bucket_get_name_value(inode->i_sb,
|
||||||
bucket_xh(xbs->bucket),
|
bucket_xh(xbs->bucket),
|
||||||
i, &block_off,
|
i, &block_off,
|
||||||
&name_offset);
|
&name_offset);
|
||||||
|
@ -2972,7 +2972,7 @@ static int ocfs2_find_xe_in_bucket(struct inode *inode,
|
||||||
if (cmp)
|
if (cmp)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ret = ocfs2_xattr_bucket_get_name_value(inode,
|
ret = ocfs2_xattr_bucket_get_name_value(inode->i_sb,
|
||||||
xh,
|
xh,
|
||||||
i,
|
i,
|
||||||
&block_off,
|
&block_off,
|
||||||
|
@ -3216,7 +3216,7 @@ struct ocfs2_xattr_tree_list {
|
||||||
size_t result;
|
size_t result;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ocfs2_xattr_bucket_get_name_value(struct inode *inode,
|
static int ocfs2_xattr_bucket_get_name_value(struct super_block *sb,
|
||||||
struct ocfs2_xattr_header *xh,
|
struct ocfs2_xattr_header *xh,
|
||||||
int index,
|
int index,
|
||||||
int *block_off,
|
int *block_off,
|
||||||
|
@ -3229,8 +3229,8 @@ static int ocfs2_xattr_bucket_get_name_value(struct inode *inode,
|
||||||
|
|
||||||
name_offset = le16_to_cpu(xh->xh_entries[index].xe_name_offset);
|
name_offset = le16_to_cpu(xh->xh_entries[index].xe_name_offset);
|
||||||
|
|
||||||
*block_off = name_offset >> inode->i_sb->s_blocksize_bits;
|
*block_off = name_offset >> sb->s_blocksize_bits;
|
||||||
*new_offset = name_offset % inode->i_sb->s_blocksize;
|
*new_offset = name_offset % sb->s_blocksize;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -3250,7 +3250,7 @@ static int ocfs2_list_xattr_bucket(struct inode *inode,
|
||||||
prefix = ocfs2_xattr_prefix(type);
|
prefix = ocfs2_xattr_prefix(type);
|
||||||
|
|
||||||
if (prefix) {
|
if (prefix) {
|
||||||
ret = ocfs2_xattr_bucket_get_name_value(inode,
|
ret = ocfs2_xattr_bucket_get_name_value(inode->i_sb,
|
||||||
bucket_xh(bucket),
|
bucket_xh(bucket),
|
||||||
i,
|
i,
|
||||||
&block_off,
|
&block_off,
|
||||||
|
@ -4845,7 +4845,7 @@ static int ocfs2_xattr_bucket_set_value_outside(struct inode *inode,
|
||||||
|
|
||||||
BUG_ON(!xs->base || !xe || ocfs2_xattr_is_local(xe));
|
BUG_ON(!xs->base || !xe || ocfs2_xattr_is_local(xe));
|
||||||
|
|
||||||
ret = ocfs2_xattr_bucket_get_name_value(inode, xh,
|
ret = ocfs2_xattr_bucket_get_name_value(inode->i_sb, xh,
|
||||||
xe - xh->xh_entries,
|
xe - xh->xh_entries,
|
||||||
&block_off,
|
&block_off,
|
||||||
&offset);
|
&offset);
|
||||||
|
@ -5433,7 +5433,7 @@ static int ocfs2_prepare_refcount_xattr(struct inode *inode,
|
||||||
i = xbs->here - xbs->header->xh_entries;
|
i = xbs->here - xbs->header->xh_entries;
|
||||||
|
|
||||||
if (le16_to_cpu(xb->xb_flags) & OCFS2_XATTR_INDEXED) {
|
if (le16_to_cpu(xb->xb_flags) & OCFS2_XATTR_INDEXED) {
|
||||||
ret = ocfs2_xattr_bucket_get_name_value(inode,
|
ret = ocfs2_xattr_bucket_get_name_value(inode->i_sb,
|
||||||
bucket_xh(xbs->bucket),
|
bucket_xh(xbs->bucket),
|
||||||
i, &block_off,
|
i, &block_off,
|
||||||
&name_offset);
|
&name_offset);
|
||||||
|
|
Loading…
Reference in New Issue