diff options
Diffstat (limited to 'fs/ocfs2/suballoc.c')
| -rw-r--r-- | fs/ocfs2/suballoc.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index 8f09f5235e3a..7e397e2c25dd 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c | |||
| @@ -101,8 +101,6 @@ static inline int ocfs2_block_group_reasonably_empty(struct ocfs2_group_desc *bg | |||
| 101 | static inline u32 ocfs2_desc_bitmap_to_cluster_off(struct inode *inode, | 101 | static inline u32 ocfs2_desc_bitmap_to_cluster_off(struct inode *inode, |
| 102 | u64 bg_blkno, | 102 | u64 bg_blkno, |
| 103 | u16 bg_bit_off); | 103 | u16 bg_bit_off); |
| 104 | static inline u64 ocfs2_which_cluster_group(struct inode *inode, | ||
| 105 | u32 cluster); | ||
| 106 | static inline void ocfs2_block_to_cluster_group(struct inode *inode, | 104 | static inline void ocfs2_block_to_cluster_group(struct inode *inode, |
| 107 | u64 data_blkno, | 105 | u64 data_blkno, |
| 108 | u64 *bg_blkno, | 106 | u64 *bg_blkno, |
| @@ -114,7 +112,7 @@ void ocfs2_free_alloc_context(struct ocfs2_alloc_context *ac) | |||
| 114 | 112 | ||
| 115 | if (inode) { | 113 | if (inode) { |
| 116 | if (ac->ac_which != OCFS2_AC_USE_LOCAL) | 114 | if (ac->ac_which != OCFS2_AC_USE_LOCAL) |
| 117 | ocfs2_meta_unlock(inode, 1); | 115 | ocfs2_inode_unlock(inode, 1); |
| 118 | 116 | ||
| 119 | mutex_unlock(&inode->i_mutex); | 117 | mutex_unlock(&inode->i_mutex); |
| 120 | 118 | ||
| @@ -131,9 +129,9 @@ static u32 ocfs2_bits_per_group(struct ocfs2_chain_list *cl) | |||
| 131 | } | 129 | } |
| 132 | 130 | ||
| 133 | /* somewhat more expensive than our other checks, so use sparingly. */ | 131 | /* somewhat more expensive than our other checks, so use sparingly. */ |
| 134 | static int ocfs2_check_group_descriptor(struct super_block *sb, | 132 | int ocfs2_check_group_descriptor(struct super_block *sb, |
| 135 | struct ocfs2_dinode *di, | 133 | struct ocfs2_dinode *di, |
| 136 | struct ocfs2_group_desc *gd) | 134 | struct ocfs2_group_desc *gd) |
| 137 | { | 135 | { |
| 138 | unsigned int max_bits; | 136 | unsigned int max_bits; |
| 139 | 137 | ||
| @@ -412,7 +410,7 @@ static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb, | |||
| 412 | 410 | ||
| 413 | mutex_lock(&alloc_inode->i_mutex); | 411 | mutex_lock(&alloc_inode->i_mutex); |
| 414 | 412 | ||
| 415 | status = ocfs2_meta_lock(alloc_inode, &bh, 1); | 413 | status = ocfs2_inode_lock(alloc_inode, &bh, 1); |
| 416 | if (status < 0) { | 414 | if (status < 0) { |
| 417 | mutex_unlock(&alloc_inode->i_mutex); | 415 | mutex_unlock(&alloc_inode->i_mutex); |
| 418 | iput(alloc_inode); | 416 | iput(alloc_inode); |
| @@ -1443,8 +1441,7 @@ static inline u32 ocfs2_desc_bitmap_to_cluster_off(struct inode *inode, | |||
| 1443 | 1441 | ||
| 1444 | /* given a cluster offset, calculate which block group it belongs to | 1442 | /* given a cluster offset, calculate which block group it belongs to |
| 1445 | * and return that block offset. */ | 1443 | * and return that block offset. */ |
| 1446 | static inline u64 ocfs2_which_cluster_group(struct inode *inode, | 1444 | u64 ocfs2_which_cluster_group(struct inode *inode, u32 cluster) |
| 1447 | u32 cluster) | ||
| 1448 | { | 1445 | { |
| 1449 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 1446 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
| 1450 | u32 group_no; | 1447 | u32 group_no; |
| @@ -1519,8 +1516,9 @@ int __ocfs2_claim_clusters(struct ocfs2_super *osb, | |||
| 1519 | if (min_clusters > (osb->bitmap_cpg - 1)) { | 1516 | if (min_clusters > (osb->bitmap_cpg - 1)) { |
| 1520 | /* The only paths asking for contiguousness | 1517 | /* The only paths asking for contiguousness |
| 1521 | * should know about this already. */ | 1518 | * should know about this already. */ |
| 1522 | mlog(ML_ERROR, "minimum allocation requested exceeds " | 1519 | mlog(ML_ERROR, "minimum allocation requested %u exceeds " |
| 1523 | "group bitmap size!"); | 1520 | "group bitmap size %u!\n", min_clusters, |
| 1521 | osb->bitmap_cpg); | ||
| 1524 | status = -ENOSPC; | 1522 | status = -ENOSPC; |
| 1525 | goto bail; | 1523 | goto bail; |
| 1526 | } | 1524 | } |
