[4/5] ext4: use ext4_warning() for sb_getblk failure

Message ID 1527594317-9214-4-git-send-email-wshilong1991@gmail.com
State New
Headers show
Series
  • [1/5] ext4: fix race with setting free_inode/clusters_counter
Related show

Commit Message

Wang Shilong May 29, 2018, 11:45 a.m.
From: Wang Shilong <wshilong@ddn.com>

out of memory should not be considered as critical
errors, replace ext4_warnig() instead of ext4_error()
for it.

Signed-off-by: Wang Shilong <wshilong@ddn.com>
---
 fs/ext4/balloc.c | 6 +++---
 fs/ext4/ialloc.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Andreas Dilger June 4, 2018, 6:11 p.m. | #1
On May 29, 2018, at 5:45 AM, Wang Shilong <wangshilong1991@gmail.com> wrote:
> 
> From: Wang Shilong <wshilong@ddn.com>
> 
> out of memory should not be considered as critical
> errors, replace ext4_warnig() instead of ext4_error()
> for it.

(typo) "ext4_warning()" can be fixed at landing time.

> Signed-off-by: Wang Shilong <wshilong@ddn.com>

Reviewed-by: Andreas Dilger <adilger@dilger.ca>

> ---
> fs/ext4/balloc.c | 6 +++---
> fs/ext4/ialloc.c | 6 +++---
> 2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
> index e3feeae..5fe63ff 100644
> --- a/fs/ext4/balloc.c
> +++ b/fs/ext4/balloc.c
> @@ -428,9 +428,9 @@ struct buffer_head *
> 	}
> 	bh = sb_getblk(sb, bitmap_blk);
> 	if (unlikely(!bh)) {
> -		ext4_error(sb, "Cannot get buffer for block bitmap - "
> -			   "block_group = %u, block_bitmap = %llu",
> -			   block_group, bitmap_blk);
> +		ext4_warning(sb, "Cannot get buffer for block bitmap - "
> +			     "block_group = %u, block_bitmap = %llu",
> +			     block_group, bitmap_blk);
> 		return ERR_PTR(-ENOMEM);
> 	}
> 
> diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
> index b7f7299..787b613 100644
> --- a/fs/ext4/ialloc.c
> +++ b/fs/ext4/ialloc.c
> @@ -135,9 +135,9 @@ static int ext4_validate_inode_bitmap(struct super_block *sb,
> 	}
> 	bh = sb_getblk(sb, bitmap_blk);
> 	if (unlikely(!bh)) {
> -		ext4_error(sb, "Cannot read inode bitmap - "
> -			    "block_group = %u, inode_bitmap = %llu",
> -			    block_group, bitmap_blk);
> +		ext4_warning(sb, "Cannot read inode bitmap - "
> +			     "block_group = %u, inode_bitmap = %llu",
> +			     block_group, bitmap_blk);
> 		return ERR_PTR(-ENOMEM);
> 	}
> 	if (bitmap_uptodate(bh))
> --
> 1.8.3.1
> 


Cheers, Andreas

Patch

diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index e3feeae..5fe63ff 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -428,9 +428,9 @@  struct buffer_head *
 	}
 	bh = sb_getblk(sb, bitmap_blk);
 	if (unlikely(!bh)) {
-		ext4_error(sb, "Cannot get buffer for block bitmap - "
-			   "block_group = %u, block_bitmap = %llu",
-			   block_group, bitmap_blk);
+		ext4_warning(sb, "Cannot get buffer for block bitmap - "
+			     "block_group = %u, block_bitmap = %llu",
+			     block_group, bitmap_blk);
 		return ERR_PTR(-ENOMEM);
 	}
 
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index b7f7299..787b613 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -135,9 +135,9 @@  static int ext4_validate_inode_bitmap(struct super_block *sb,
 	}
 	bh = sb_getblk(sb, bitmap_blk);
 	if (unlikely(!bh)) {
-		ext4_error(sb, "Cannot read inode bitmap - "
-			    "block_group = %u, inode_bitmap = %llu",
-			    block_group, bitmap_blk);
+		ext4_warning(sb, "Cannot read inode bitmap - "
+			     "block_group = %u, inode_bitmap = %llu",
+			     block_group, bitmap_blk);
 		return ERR_PTR(-ENOMEM);
 	}
 	if (bitmap_uptodate(bh))