diff options
author | Tao Ma <tao.ma@oracle.com> | 2009-08-17 23:43:21 -0400 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2009-09-22 23:09:41 -0400 |
commit | fd68a894fc9641f816d9cffa58e853ba91cbc1a1 (patch) | |
tree | 3af84546b32c54aba009f23681fd30c28df7240b /fs | |
parent | 492a8a33e1cb966fa0b5756c5fc11d30c8f8848e (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/xattr.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index a538cebbe9c5..eeb5b7caf195 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c | |||
@@ -140,7 +140,7 @@ struct ocfs2_xattr_search { | |||
140 | int not_found; | 140 | int not_found; |
141 | }; | 141 | }; |
142 | 142 | ||
143 | static int ocfs2_xattr_bucket_get_name_value(struct inode *inode, | 143 | static int ocfs2_xattr_bucket_get_name_value(struct super_block *sb, |
144 | struct ocfs2_xattr_header *xh, | 144 | struct ocfs2_xattr_header *xh, |
145 | int index, | 145 | int index, |
146 | int *block_off, | 146 | int *block_off, |
@@ -1101,7 +1101,7 @@ static int ocfs2_xattr_block_get(struct inode *inode, | |||
1101 | i = xs->here - xs->header->xh_entries; | 1101 | i = xs->here - xs->header->xh_entries; |
1102 | 1102 | ||
1103 | if (le16_to_cpu(xb->xb_flags) & OCFS2_XATTR_INDEXED) { | 1103 | if (le16_to_cpu(xb->xb_flags) & OCFS2_XATTR_INDEXED) { |
1104 | ret = ocfs2_xattr_bucket_get_name_value(inode, | 1104 | ret = ocfs2_xattr_bucket_get_name_value(inode->i_sb, |
1105 | bucket_xh(xs->bucket), | 1105 | bucket_xh(xs->bucket), |
1106 | i, | 1106 | i, |
1107 | &block_off, | 1107 | &block_off, |
@@ -2297,7 +2297,7 @@ static int ocfs2_calc_xattr_set_need(struct inode *inode, | |||
2297 | old_in_xb = 1; | 2297 | old_in_xb = 1; |
2298 | 2298 | ||
2299 | if (le16_to_cpu(xb->xb_flags) & OCFS2_XATTR_INDEXED) { | 2299 | if (le16_to_cpu(xb->xb_flags) & OCFS2_XATTR_INDEXED) { |
2300 | ret = ocfs2_xattr_bucket_get_name_value(inode, | 2300 | ret = ocfs2_xattr_bucket_get_name_value(inode->i_sb, |
2301 | bucket_xh(xbs->bucket), | 2301 | bucket_xh(xbs->bucket), |
2302 | i, &block_off, | 2302 | i, &block_off, |
2303 | &name_offset); | 2303 | &name_offset); |
@@ -2972,7 +2972,7 @@ static int ocfs2_find_xe_in_bucket(struct inode *inode, | |||
2972 | if (cmp) | 2972 | if (cmp) |
2973 | continue; | 2973 | continue; |
2974 | 2974 | ||
2975 | ret = ocfs2_xattr_bucket_get_name_value(inode, | 2975 | ret = ocfs2_xattr_bucket_get_name_value(inode->i_sb, |
2976 | xh, | 2976 | xh, |
2977 | i, | 2977 | i, |
2978 | &block_off, | 2978 | &block_off, |
@@ -3216,7 +3216,7 @@ struct ocfs2_xattr_tree_list { | |||
3216 | size_t result; | 3216 | size_t result; |
3217 | }; | 3217 | }; |
3218 | 3218 | ||
3219 | static int ocfs2_xattr_bucket_get_name_value(struct inode *inode, | 3219 | static int ocfs2_xattr_bucket_get_name_value(struct super_block *sb, |
3220 | struct ocfs2_xattr_header *xh, | 3220 | struct ocfs2_xattr_header *xh, |
3221 | int index, | 3221 | int index, |
3222 | int *block_off, | 3222 | int *block_off, |
@@ -3229,8 +3229,8 @@ static int ocfs2_xattr_bucket_get_name_value(struct inode *inode, | |||
3229 | 3229 | ||
3230 | name_offset = le16_to_cpu(xh->xh_entries[index].xe_name_offset); | 3230 | name_offset = le16_to_cpu(xh->xh_entries[index].xe_name_offset); |
3231 | 3231 | ||
3232 | *block_off = name_offset >> inode->i_sb->s_blocksize_bits; | 3232 | *block_off = name_offset >> sb->s_blocksize_bits; |
3233 | *new_offset = name_offset % inode->i_sb->s_blocksize; | 3233 | *new_offset = name_offset % sb->s_blocksize; |
3234 | 3234 | ||
3235 | return 0; | 3235 | return 0; |
3236 | } | 3236 | } |
@@ -3250,7 +3250,7 @@ static int ocfs2_list_xattr_bucket(struct inode *inode, | |||
3250 | prefix = ocfs2_xattr_prefix(type); | 3250 | prefix = ocfs2_xattr_prefix(type); |
3251 | 3251 | ||
3252 | if (prefix) { | 3252 | if (prefix) { |
3253 | ret = ocfs2_xattr_bucket_get_name_value(inode, | 3253 | ret = ocfs2_xattr_bucket_get_name_value(inode->i_sb, |
3254 | bucket_xh(bucket), | 3254 | bucket_xh(bucket), |
3255 | i, | 3255 | i, |
3256 | &block_off, | 3256 | &block_off, |
@@ -4845,7 +4845,7 @@ static int ocfs2_xattr_bucket_set_value_outside(struct inode *inode, | |||
4845 | 4845 | ||
4846 | BUG_ON(!xs->base || !xe || ocfs2_xattr_is_local(xe)); | 4846 | BUG_ON(!xs->base || !xe || ocfs2_xattr_is_local(xe)); |
4847 | 4847 | ||
4848 | ret = ocfs2_xattr_bucket_get_name_value(inode, xh, | 4848 | ret = ocfs2_xattr_bucket_get_name_value(inode->i_sb, xh, |
4849 | xe - xh->xh_entries, | 4849 | xe - xh->xh_entries, |
4850 | &block_off, | 4850 | &block_off, |
4851 | &offset); | 4851 | &offset); |
@@ -5433,7 +5433,7 @@ static int ocfs2_prepare_refcount_xattr(struct inode *inode, | |||
5433 | i = xbs->here - xbs->header->xh_entries; | 5433 | i = xbs->here - xbs->header->xh_entries; |
5434 | 5434 | ||
5435 | if (le16_to_cpu(xb->xb_flags) & OCFS2_XATTR_INDEXED) { | 5435 | if (le16_to_cpu(xb->xb_flags) & OCFS2_XATTR_INDEXED) { |
5436 | ret = ocfs2_xattr_bucket_get_name_value(inode, | 5436 | ret = ocfs2_xattr_bucket_get_name_value(inode->i_sb, |
5437 | bucket_xh(xbs->bucket), | 5437 | bucket_xh(xbs->bucket), |
5438 | i, &block_off, | 5438 | i, &block_off, |
5439 | &name_offset); | 5439 | &name_offset); |