diff options
-rw-r--r-- | fs/ocfs2/alloc.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/aops.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/buffer_head_io.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/dir.c | 8 | ||||
-rw-r--r-- | fs/ocfs2/namei.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/refcounttree.c | 6 | ||||
-rw-r--r-- | fs/ocfs2/suballoc.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/super.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/xattr.c | 2 |
9 files changed, 18 insertions, 16 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 17e6bdde96c5..dc7411fe185d 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -1025,7 +1025,7 @@ static int ocfs2_create_new_meta_bhs(handle_t *handle, | |||
1025 | for(i = count; i < (num_got + count); i++) { | 1025 | for(i = count; i < (num_got + count); i++) { |
1026 | bhs[i] = sb_getblk(osb->sb, first_blkno); | 1026 | bhs[i] = sb_getblk(osb->sb, first_blkno); |
1027 | if (bhs[i] == NULL) { | 1027 | if (bhs[i] == NULL) { |
1028 | status = -EIO; | 1028 | status = -ENOMEM; |
1029 | mlog_errno(status); | 1029 | mlog_errno(status); |
1030 | goto bail; | 1030 | goto bail; |
1031 | } | 1031 | } |
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index c0d4797618ef..c20360002f29 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -80,6 +80,7 @@ static int ocfs2_symlink_get_block(struct inode *inode, sector_t iblock, | |||
80 | 80 | ||
81 | if ((u64)iblock >= ocfs2_clusters_to_blocks(inode->i_sb, | 81 | if ((u64)iblock >= ocfs2_clusters_to_blocks(inode->i_sb, |
82 | le32_to_cpu(fe->i_clusters))) { | 82 | le32_to_cpu(fe->i_clusters))) { |
83 | err = -ENOMEM; | ||
83 | mlog(ML_ERROR, "block offset is outside the allocated size: " | 84 | mlog(ML_ERROR, "block offset is outside the allocated size: " |
84 | "%llu\n", (unsigned long long)iblock); | 85 | "%llu\n", (unsigned long long)iblock); |
85 | goto bail; | 86 | goto bail; |
@@ -92,6 +93,7 @@ static int ocfs2_symlink_get_block(struct inode *inode, sector_t iblock, | |||
92 | iblock; | 93 | iblock; |
93 | buffer_cache_bh = sb_getblk(osb->sb, blkno); | 94 | buffer_cache_bh = sb_getblk(osb->sb, blkno); |
94 | if (!buffer_cache_bh) { | 95 | if (!buffer_cache_bh) { |
96 | err = -ENOMEM; | ||
95 | mlog(ML_ERROR, "couldn't getblock for symlink!\n"); | 97 | mlog(ML_ERROR, "couldn't getblock for symlink!\n"); |
96 | goto bail; | 98 | goto bail; |
97 | } | 99 | } |
diff --git a/fs/ocfs2/buffer_head_io.c b/fs/ocfs2/buffer_head_io.c index 5d18ad10c27f..5b704c63a103 100644 --- a/fs/ocfs2/buffer_head_io.c +++ b/fs/ocfs2/buffer_head_io.c | |||
@@ -115,7 +115,7 @@ int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block, | |||
115 | if (bhs[i] == NULL) { | 115 | if (bhs[i] == NULL) { |
116 | bhs[i] = sb_getblk(osb->sb, block++); | 116 | bhs[i] = sb_getblk(osb->sb, block++); |
117 | if (bhs[i] == NULL) { | 117 | if (bhs[i] == NULL) { |
118 | status = -EIO; | 118 | status = -ENOMEM; |
119 | mlog_errno(status); | 119 | mlog_errno(status); |
120 | goto bail; | 120 | goto bail; |
121 | } | 121 | } |
@@ -214,7 +214,7 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr, | |||
214 | bhs[i] = sb_getblk(sb, block++); | 214 | bhs[i] = sb_getblk(sb, block++); |
215 | if (bhs[i] == NULL) { | 215 | if (bhs[i] == NULL) { |
216 | ocfs2_metadata_cache_io_unlock(ci); | 216 | ocfs2_metadata_cache_io_unlock(ci); |
217 | status = -EIO; | 217 | status = -ENOMEM; |
218 | mlog_errno(status); | 218 | mlog_errno(status); |
219 | goto bail; | 219 | goto bail; |
220 | } | 220 | } |
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index 93b079115edc..91a7e85ac8fd 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c | |||
@@ -2349,7 +2349,7 @@ static int ocfs2_dx_dir_attach_index(struct ocfs2_super *osb, | |||
2349 | 2349 | ||
2350 | dx_root_bh = sb_getblk(osb->sb, dr_blkno); | 2350 | dx_root_bh = sb_getblk(osb->sb, dr_blkno); |
2351 | if (dx_root_bh == NULL) { | 2351 | if (dx_root_bh == NULL) { |
2352 | ret = -EIO; | 2352 | ret = -ENOMEM; |
2353 | goto out; | 2353 | goto out; |
2354 | } | 2354 | } |
2355 | ocfs2_set_new_buffer_uptodate(INODE_CACHE(dir), dx_root_bh); | 2355 | ocfs2_set_new_buffer_uptodate(INODE_CACHE(dir), dx_root_bh); |
@@ -2422,7 +2422,7 @@ static int ocfs2_dx_dir_format_cluster(struct ocfs2_super *osb, | |||
2422 | for (i = 0; i < num_dx_leaves; i++) { | 2422 | for (i = 0; i < num_dx_leaves; i++) { |
2423 | bh = sb_getblk(osb->sb, start_blk + i); | 2423 | bh = sb_getblk(osb->sb, start_blk + i); |
2424 | if (bh == NULL) { | 2424 | if (bh == NULL) { |
2425 | ret = -EIO; | 2425 | ret = -ENOMEM; |
2426 | goto out; | 2426 | goto out; |
2427 | } | 2427 | } |
2428 | dx_leaves[i] = bh; | 2428 | dx_leaves[i] = bh; |
@@ -2929,7 +2929,7 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh, | |||
2929 | blkno = ocfs2_clusters_to_blocks(dir->i_sb, bit_off); | 2929 | blkno = ocfs2_clusters_to_blocks(dir->i_sb, bit_off); |
2930 | dirdata_bh = sb_getblk(sb, blkno); | 2930 | dirdata_bh = sb_getblk(sb, blkno); |
2931 | if (!dirdata_bh) { | 2931 | if (!dirdata_bh) { |
2932 | ret = -EIO; | 2932 | ret = -ENOMEM; |
2933 | mlog_errno(ret); | 2933 | mlog_errno(ret); |
2934 | goto out_commit; | 2934 | goto out_commit; |
2935 | } | 2935 | } |
@@ -3159,7 +3159,7 @@ static int ocfs2_do_extend_dir(struct super_block *sb, | |||
3159 | 3159 | ||
3160 | *new_bh = sb_getblk(sb, p_blkno); | 3160 | *new_bh = sb_getblk(sb, p_blkno); |
3161 | if (!*new_bh) { | 3161 | if (!*new_bh) { |
3162 | status = -EIO; | 3162 | status = -ENOMEM; |
3163 | mlog_errno(status); | 3163 | mlog_errno(status); |
3164 | goto bail; | 3164 | goto bail; |
3165 | } | 3165 | } |
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index be3f8676a438..4f791f6d27d0 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
@@ -489,7 +489,7 @@ static int __ocfs2_mknod_locked(struct inode *dir, | |||
489 | 489 | ||
490 | *new_fe_bh = sb_getblk(osb->sb, fe_blkno); | 490 | *new_fe_bh = sb_getblk(osb->sb, fe_blkno); |
491 | if (!*new_fe_bh) { | 491 | if (!*new_fe_bh) { |
492 | status = -EIO; | 492 | status = -ENOMEM; |
493 | mlog_errno(status); | 493 | mlog_errno(status); |
494 | goto leave; | 494 | goto leave; |
495 | } | 495 | } |
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 0022192e7ac8..70d083e60d40 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c | |||
@@ -1310,7 +1310,7 @@ static int ocfs2_expand_inline_ref_root(handle_t *handle, | |||
1310 | 1310 | ||
1311 | new_bh = sb_getblk(sb, blkno); | 1311 | new_bh = sb_getblk(sb, blkno); |
1312 | if (new_bh == NULL) { | 1312 | if (new_bh == NULL) { |
1313 | ret = -EIO; | 1313 | ret = -ENOMEM; |
1314 | mlog_errno(ret); | 1314 | mlog_errno(ret); |
1315 | goto out; | 1315 | goto out; |
1316 | } | 1316 | } |
@@ -1561,7 +1561,7 @@ static int ocfs2_new_leaf_refcount_block(handle_t *handle, | |||
1561 | 1561 | ||
1562 | new_bh = sb_getblk(sb, blkno); | 1562 | new_bh = sb_getblk(sb, blkno); |
1563 | if (new_bh == NULL) { | 1563 | if (new_bh == NULL) { |
1564 | ret = -EIO; | 1564 | ret = -ENOMEM; |
1565 | mlog_errno(ret); | 1565 | mlog_errno(ret); |
1566 | goto out; | 1566 | goto out; |
1567 | } | 1567 | } |
@@ -3029,7 +3029,7 @@ int ocfs2_duplicate_clusters_by_jbd(handle_t *handle, | |||
3029 | for (i = 0; i < blocks; i++, old_block++, new_block++) { | 3029 | for (i = 0; i < blocks; i++, old_block++, new_block++) { |
3030 | new_bh = sb_getblk(osb->sb, new_block); | 3030 | new_bh = sb_getblk(osb->sb, new_block); |
3031 | if (new_bh == NULL) { | 3031 | if (new_bh == NULL) { |
3032 | ret = -EIO; | 3032 | ret = -ENOMEM; |
3033 | mlog_errno(ret); | 3033 | mlog_errno(ret); |
3034 | break; | 3034 | break; |
3035 | } | 3035 | } |
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index 5397c07ce608..2c91452c4047 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c | |||
@@ -481,7 +481,7 @@ ocfs2_block_group_alloc_contig(struct ocfs2_super *osb, handle_t *handle, | |||
481 | 481 | ||
482 | bg_bh = sb_getblk(osb->sb, bg_blkno); | 482 | bg_bh = sb_getblk(osb->sb, bg_blkno); |
483 | if (!bg_bh) { | 483 | if (!bg_bh) { |
484 | status = -EIO; | 484 | status = -ENOMEM; |
485 | mlog_errno(status); | 485 | mlog_errno(status); |
486 | goto bail; | 486 | goto bail; |
487 | } | 487 | } |
@@ -661,7 +661,7 @@ ocfs2_block_group_alloc_discontig(handle_t *handle, | |||
661 | 661 | ||
662 | bg_bh = sb_getblk(osb->sb, bg_blkno); | 662 | bg_bh = sb_getblk(osb->sb, bg_blkno); |
663 | if (!bg_bh) { | 663 | if (!bg_bh) { |
664 | status = -EIO; | 664 | status = -ENOMEM; |
665 | mlog_errno(status); | 665 | mlog_errno(status); |
666 | goto bail; | 666 | goto bail; |
667 | } | 667 | } |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index d4e81e4a9b04..c41492957aa5 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -1848,8 +1848,8 @@ static int ocfs2_get_sector(struct super_block *sb, | |||
1848 | 1848 | ||
1849 | *bh = sb_getblk(sb, block); | 1849 | *bh = sb_getblk(sb, block); |
1850 | if (!*bh) { | 1850 | if (!*bh) { |
1851 | mlog_errno(-EIO); | 1851 | mlog_errno(-ENOMEM); |
1852 | return -EIO; | 1852 | return -ENOMEM; |
1853 | } | 1853 | } |
1854 | lock_buffer(*bh); | 1854 | lock_buffer(*bh); |
1855 | if (!buffer_dirty(*bh)) | 1855 | if (!buffer_dirty(*bh)) |
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index aaaab8ba82ab..82257299d5ea 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c | |||
@@ -377,7 +377,7 @@ static int ocfs2_init_xattr_bucket(struct ocfs2_xattr_bucket *bucket, | |||
377 | bucket->bu_bhs[i] = sb_getblk(bucket->bu_inode->i_sb, | 377 | bucket->bu_bhs[i] = sb_getblk(bucket->bu_inode->i_sb, |
378 | xb_blkno + i); | 378 | xb_blkno + i); |
379 | if (!bucket->bu_bhs[i]) { | 379 | if (!bucket->bu_bhs[i]) { |
380 | rc = -EIO; | 380 | rc = -ENOMEM; |
381 | mlog_errno(rc); | 381 | mlog_errno(rc); |
382 | break; | 382 | break; |
383 | } | 383 | } |