Skip to content

Commit

Permalink
ext4: return ENOMEM when mounts fail due to lack of memory
Browse files Browse the repository at this point in the history
This is a port of the ext3 commit: 4569cd1

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Theodore Ts'o committed May 28, 2012
1 parent 2716b80 commit 2cde417
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -3527,6 +3527,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
GFP_KERNEL);
if (sbi->s_group_desc == NULL) {
ext4_msg(sb, KERN_ERR, "not enough memory");
ret = -ENOMEM;
goto failed_mount;
}

Expand Down Expand Up @@ -3584,6 +3585,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
}
if (err) {
ext4_msg(sb, KERN_ERR, "insufficient memory");
ret = err;
goto failed_mount3;
}

Expand Down

0 comments on commit 2cde417

Please sign in to comment.