diff options
author | Joel Becker <joel.becker@oracle.com> | 2010-05-06 01:59:06 -0400 |
---|---|---|
committer | Tao Ma <tao.ma@oracle.com> | 2010-05-06 01:59:06 -0400 |
commit | 1ed9b777f77929ae961d6f9cdf828a07200ba71c (patch) | |
tree | a0bb6c9e9be1f5d3d46d6cdac0a4397303e22795 /fs/ocfs2/xattr.c | |
parent | 13e434cf0cacd2f03a7f4cd077e3e995ef5ef710 (diff) |
ocfs2: ocfs2_claim_*() don't need an ocfs2_super argument.
They all take an ocfs2_alloc_context, which has the allocation inode.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Diffstat (limited to 'fs/ocfs2/xattr.c')
-rw-r--r-- | fs/ocfs2/xattr.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 38a55ff45b3a..2f6fd48c0ba4 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c | |||
@@ -2831,7 +2831,6 @@ static int ocfs2_create_xattr_block(struct inode *inode, | |||
2831 | u32 num_got; | 2831 | u32 num_got; |
2832 | u64 first_blkno; | 2832 | u64 first_blkno; |
2833 | struct ocfs2_dinode *di = (struct ocfs2_dinode *)inode_bh->b_data; | 2833 | struct ocfs2_dinode *di = (struct ocfs2_dinode *)inode_bh->b_data; |
2834 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | ||
2835 | struct buffer_head *new_bh = NULL; | 2834 | struct buffer_head *new_bh = NULL; |
2836 | struct ocfs2_xattr_block *xblk; | 2835 | struct ocfs2_xattr_block *xblk; |
2837 | 2836 | ||
@@ -2842,7 +2841,7 @@ static int ocfs2_create_xattr_block(struct inode *inode, | |||
2842 | goto end; | 2841 | goto end; |
2843 | } | 2842 | } |
2844 | 2843 | ||
2845 | ret = ocfs2_claim_metadata(osb, ctxt->handle, ctxt->meta_ac, 1, | 2844 | ret = ocfs2_claim_metadata(ctxt->handle, ctxt->meta_ac, 1, |
2846 | &suballoc_bit_start, &num_got, | 2845 | &suballoc_bit_start, &num_got, |
2847 | &first_blkno); | 2846 | &first_blkno); |
2848 | if (ret < 0) { | 2847 | if (ret < 0) { |
@@ -2867,7 +2866,8 @@ static int ocfs2_create_xattr_block(struct inode *inode, | |||
2867 | strcpy((void *)xblk, OCFS2_XATTR_BLOCK_SIGNATURE); | 2866 | strcpy((void *)xblk, OCFS2_XATTR_BLOCK_SIGNATURE); |
2868 | xblk->xb_suballoc_slot = cpu_to_le16(ctxt->meta_ac->ac_alloc_slot); | 2867 | xblk->xb_suballoc_slot = cpu_to_le16(ctxt->meta_ac->ac_alloc_slot); |
2869 | xblk->xb_suballoc_bit = cpu_to_le16(suballoc_bit_start); | 2868 | xblk->xb_suballoc_bit = cpu_to_le16(suballoc_bit_start); |
2870 | xblk->xb_fs_generation = cpu_to_le32(osb->fs_generation); | 2869 | xblk->xb_fs_generation = |
2870 | cpu_to_le32(OCFS2_SB(inode->i_sb)->fs_generation); | ||
2871 | xblk->xb_blkno = cpu_to_le64(first_blkno); | 2871 | xblk->xb_blkno = cpu_to_le64(first_blkno); |
2872 | if (indexed) { | 2872 | if (indexed) { |
2873 | struct ocfs2_xattr_tree_root *xr = &xblk->xb_attrs.xb_root; | 2873 | struct ocfs2_xattr_tree_root *xr = &xblk->xb_attrs.xb_root; |
@@ -4229,7 +4229,6 @@ static int ocfs2_xattr_create_index_block(struct inode *inode, | |||
4229 | u32 bit_off, len; | 4229 | u32 bit_off, len; |
4230 | u64 blkno; | 4230 | u64 blkno; |
4231 | handle_t *handle = ctxt->handle; | 4231 | handle_t *handle = ctxt->handle; |
4232 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | ||
4233 | struct ocfs2_inode_info *oi = OCFS2_I(inode); | 4232 | struct ocfs2_inode_info *oi = OCFS2_I(inode); |
4234 | struct buffer_head *xb_bh = xs->xattr_bh; | 4233 | struct buffer_head *xb_bh = xs->xattr_bh; |
4235 | struct ocfs2_xattr_block *xb = | 4234 | struct ocfs2_xattr_block *xb = |
@@ -4257,7 +4256,7 @@ static int ocfs2_xattr_create_index_block(struct inode *inode, | |||
4257 | goto out; | 4256 | goto out; |
4258 | } | 4257 | } |
4259 | 4258 | ||
4260 | ret = __ocfs2_claim_clusters(osb, handle, ctxt->data_ac, | 4259 | ret = __ocfs2_claim_clusters(handle, ctxt->data_ac, |
4261 | 1, 1, &bit_off, &len); | 4260 | 1, 1, &bit_off, &len); |
4262 | if (ret) { | 4261 | if (ret) { |
4263 | mlog_errno(ret); | 4262 | mlog_errno(ret); |
@@ -5078,7 +5077,7 @@ static int ocfs2_add_new_xattr_cluster(struct inode *inode, | |||
5078 | goto leave; | 5077 | goto leave; |
5079 | } | 5078 | } |
5080 | 5079 | ||
5081 | ret = __ocfs2_claim_clusters(osb, handle, ctxt->data_ac, 1, | 5080 | ret = __ocfs2_claim_clusters(handle, ctxt->data_ac, 1, |
5082 | clusters_to_add, &bit_off, &num_bits); | 5081 | clusters_to_add, &bit_off, &num_bits); |
5083 | if (ret < 0) { | 5082 | if (ret < 0) { |
5084 | if (ret != -ENOSPC) | 5083 | if (ret != -ENOSPC) |
@@ -6906,7 +6905,7 @@ static int ocfs2_reflink_xattr_rec(struct inode *inode, | |||
6906 | goto out; | 6905 | goto out; |
6907 | } | 6906 | } |
6908 | 6907 | ||
6909 | ret = ocfs2_claim_clusters(osb, handle, data_ac, | 6908 | ret = ocfs2_claim_clusters(handle, data_ac, |
6910 | len, &p_cluster, &num_clusters); | 6909 | len, &p_cluster, &num_clusters); |
6911 | if (ret) { | 6910 | if (ret) { |
6912 | mlog_errno(ret); | 6911 | mlog_errno(ret); |