summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/xattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/xattr.c')
-rw-r--r--fs/ocfs2/xattr.c74
1 files changed, 35 insertions, 39 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8f522f2..63037bd 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -537,9 +537,9 @@ static int ocfs2_xattr_block_list(struct inode *inode,
if (!di->i_xattr_loc)
return ret;
- ret = ocfs2_read_block(OCFS2_SB(inode->i_sb),
+ ret = ocfs2_read_block(inode,
le64_to_cpu(di->i_xattr_loc),
- &blk_bh, OCFS2_BH_CACHED, inode);
+ &blk_bh, OCFS2_BH_CACHED);
if (ret < 0) {
mlog_errno(ret);
return ret;
@@ -672,8 +672,8 @@ static int ocfs2_xattr_get_value_outside(struct inode *inode,
blkno = ocfs2_clusters_to_blocks(inode->i_sb, p_cluster);
/* Copy ocfs2_xattr_value */
for (i = 0; i < num_clusters * bpc; i++, blkno++) {
- ret = ocfs2_read_block(OCFS2_SB(inode->i_sb), blkno,
- &bh, OCFS2_BH_CACHED, inode);
+ ret = ocfs2_read_block(inode, blkno,
+ &bh, OCFS2_BH_CACHED);
if (ret) {
mlog_errno(ret);
goto out;
@@ -764,9 +764,9 @@ static int ocfs2_xattr_block_get(struct inode *inode,
memset(&xs->bucket, 0, sizeof(xs->bucket));
- ret = ocfs2_read_block(OCFS2_SB(inode->i_sb),
+ ret = ocfs2_read_block(inode,
le64_to_cpu(di->i_xattr_loc),
- &blk_bh, OCFS2_BH_CACHED, inode);
+ &blk_bh, OCFS2_BH_CACHED);
if (ret < 0) {
mlog_errno(ret);
return ret;
@@ -922,8 +922,8 @@ static int __ocfs2_xattr_set_value_outside(struct inode *inode,
blkno = ocfs2_clusters_to_blocks(inode->i_sb, p_cluster);
for (i = 0; i < num_clusters * bpc; i++, blkno++) {
- ret = ocfs2_read_block(OCFS2_SB(inode->i_sb), blkno,
- &bh, OCFS2_BH_CACHED, inode);
+ ret = ocfs2_read_block(inode, blkno,
+ &bh, OCFS2_BH_CACHED);
if (ret) {
mlog_errno(ret);
goto out_commit;
@@ -1514,8 +1514,8 @@ static int ocfs2_xattr_free_block(struct inode *inode,
u64 blk, bg_blkno;
u16 bit;
- ret = ocfs2_read_block(osb, block, &blk_bh,
- OCFS2_BH_CACHED, inode);
+ ret = ocfs2_read_block(inode, block, &blk_bh,
+ OCFS2_BH_CACHED);
if (ret < 0) {
mlog_errno(ret);
goto out;
@@ -1773,9 +1773,9 @@ static int ocfs2_xattr_block_find(struct inode *inode,
if (!di->i_xattr_loc)
return ret;
- ret = ocfs2_read_block(OCFS2_SB(inode->i_sb),
+ ret = ocfs2_read_block(inode,
le64_to_cpu(di->i_xattr_loc),
- &blk_bh, OCFS2_BH_CACHED, inode);
+ &blk_bh, OCFS2_BH_CACHED);
if (ret < 0) {
mlog_errno(ret);
return ret;
@@ -2216,9 +2216,9 @@ static int ocfs2_find_xe_in_bucket(struct inode *inode,
break;
}
- ret = ocfs2_read_block(OCFS2_SB(inode->i_sb),
+ ret = ocfs2_read_block(inode,
header_bh->b_blocknr + block_off,
- &name_bh, OCFS2_BH_CACHED, inode);
+ &name_bh, OCFS2_BH_CACHED);
if (ret) {
mlog_errno(ret);
break;
@@ -2269,8 +2269,7 @@ static int ocfs2_xattr_bucket_find(struct inode *inode,
u32 last_hash;
u64 blkno;
- ret = ocfs2_read_block(OCFS2_SB(inode->i_sb), p_blkno,
- &bh, OCFS2_BH_CACHED, inode);
+ ret = ocfs2_read_block(inode, p_blkno, &bh, OCFS2_BH_CACHED);
if (ret) {
mlog_errno(ret);
goto out;
@@ -2286,8 +2285,7 @@ static int ocfs2_xattr_bucket_find(struct inode *inode,
blkno = p_blkno + bucket * blk_per_bucket;
- ret = ocfs2_read_block(OCFS2_SB(inode->i_sb), blkno,
- &bh, OCFS2_BH_CACHED, inode);
+ ret = ocfs2_read_block(inode, blkno, &bh, OCFS2_BH_CACHED);
if (ret) {
mlog_errno(ret);
goto out;
@@ -2359,10 +2357,9 @@ static int ocfs2_xattr_bucket_find(struct inode *inode,
* If we have found the xattr enty, read all the blocks in
* this bucket.
*/
- ret = ocfs2_read_blocks(OCFS2_SB(inode->i_sb),
- xs->bucket.bhs[0]->b_blocknr + 1,
+ ret = ocfs2_read_blocks(inode, xs->bucket.bhs[0]->b_blocknr + 1,
blk_per_bucket - 1, &xs->bucket.bhs[1],
- OCFS2_BH_CACHED, inode);
+ OCFS2_BH_CACHED);
if (ret) {
mlog_errno(ret);
goto out;
@@ -2438,9 +2435,8 @@ static int ocfs2_iterate_xattr_buckets(struct inode *inode,
clusters, blkno);
for (i = 0; i < num_buckets; i++, blkno += blk_per_bucket) {
- ret = ocfs2_read_blocks(OCFS2_SB(inode->i_sb),
- blkno, blk_per_bucket,
- bucket.bhs, OCFS2_BH_CACHED, inode);
+ ret = ocfs2_read_blocks(inode, blkno, blk_per_bucket,
+ bucket.bhs, OCFS2_BH_CACHED);
if (ret) {
mlog_errno(ret);
goto out;
@@ -2705,10 +2701,10 @@ static int ocfs2_xattr_update_xattr_search(struct inode *inode,
if (!xs->not_found) {
if (OCFS2_XATTR_BUCKET_SIZE != blocksize) {
- ret = ocfs2_read_blocks(OCFS2_SB(inode->i_sb),
+ ret = ocfs2_read_blocks(inode,
xs->bucket.bhs[0]->b_blocknr + 1,
blk_per_bucket - 1, &xs->bucket.bhs[1],
- OCFS2_BH_CACHED, inode);
+ OCFS2_BH_CACHED);
if (ret) {
mlog_errno(ret);
return ret;
@@ -2913,8 +2909,8 @@ static int ocfs2_defrag_xattr_bucket(struct inode *inode,
if (!bhs)
return -ENOMEM;
- ret = ocfs2_read_blocks(osb, blkno, blk_per_bucket, bhs,
- OCFS2_BH_CACHED, inode);
+ ret = ocfs2_read_blocks(inode, blkno, blk_per_bucket, bhs,
+ OCFS2_BH_CACHED);
if (ret)
goto out;
@@ -3114,8 +3110,8 @@ static int ocfs2_mv_xattr_bucket_cross_cluster(struct inode *inode,
goto out;
}
- ret = ocfs2_read_block(osb, prev_blkno,
- &old_bh, OCFS2_BH_CACHED, inode);
+ ret = ocfs2_read_block(inode, prev_blkno,
+ &old_bh, OCFS2_BH_CACHED);
if (ret < 0) {
mlog_errno(ret);
brelse(new_bh);
@@ -3168,9 +3164,9 @@ static int ocfs2_read_xattr_bucket(struct inode *inode,
u16 i, blk_per_bucket = ocfs2_blocks_per_xattr_bucket(inode->i_sb);
if (!new)
- return ocfs2_read_blocks(OCFS2_SB(inode->i_sb), blkno,
+ return ocfs2_read_blocks(inode, blkno,
blk_per_bucket, bhs,
- OCFS2_BH_CACHED, inode);
+ OCFS2_BH_CACHED);
for (i = 0; i < blk_per_bucket; i++) {
bhs[i] = sb_getblk(inode->i_sb, blkno + i);
@@ -3485,7 +3481,7 @@ static int ocfs2_cp_xattr_cluster(struct inode *inode,
ocfs2_journal_dirty(handle, first_bh);
/* update the new bucket header. */
- ret = ocfs2_read_block(osb, to_blk_start, &bh, OCFS2_BH_CACHED, inode);
+ ret = ocfs2_read_block(inode, to_blk_start, &bh, OCFS2_BH_CACHED);
if (ret < 0) {
mlog_errno(ret);
goto out;
@@ -3872,8 +3868,8 @@ static int ocfs2_add_new_xattr_bucket(struct inode *inode,
goto out;
}
- ret = ocfs2_read_block(osb, p_blkno,
- &first_bh, OCFS2_BH_CACHED, inode);
+ ret = ocfs2_read_block(inode, p_blkno,
+ &first_bh, OCFS2_BH_CACHED);
if (ret) {
mlog_errno(ret);
goto out;
@@ -4115,10 +4111,10 @@ static int ocfs2_xattr_set_entry_in_bucket(struct inode *inode,
(unsigned long long)xs->bucket.bhs[0]->b_blocknr);
if (!xs->bucket.bhs[1]) {
- ret = ocfs2_read_blocks(osb,
+ ret = ocfs2_read_blocks(inode,
xs->bucket.bhs[0]->b_blocknr + 1,
blk_per_bucket - 1, &xs->bucket.bhs[1],
- OCFS2_BH_CACHED, inode);
+ OCFS2_BH_CACHED);
if (ret) {
mlog_errno(ret);
goto out;
@@ -4224,8 +4220,8 @@ static int ocfs2_xattr_bucket_value_truncate(struct inode *inode,
BUG_ON(value_blk != (offset + OCFS2_XATTR_ROOT_SIZE - 1) / blocksize);
value_blk += header_bh->b_blocknr;
- ret = ocfs2_read_block(OCFS2_SB(inode->i_sb), value_blk,
- &value_bh, OCFS2_BH_CACHED, inode);
+ ret = ocfs2_read_block(inode, value_blk,
+ &value_bh, OCFS2_BH_CACHED);
if (ret) {
mlog_errno(ret);
goto out;
OpenPOWER on IntegriCloud