فهرست منبع

ext4: return ENOMEM when mounts fail due to lack of memory

This is a port of the ext3 commit: 4569cd1b0d9

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o 13 سال پیش
والد
کامیت
2cde417de0
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      fs/ext4/super.c

+ 2 - 0
fs/ext4/super.c

@@ -3527,6 +3527,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 					  GFP_KERNEL);
 					  GFP_KERNEL);
 	if (sbi->s_group_desc == NULL) {
 	if (sbi->s_group_desc == NULL) {
 		ext4_msg(sb, KERN_ERR, "not enough memory");
 		ext4_msg(sb, KERN_ERR, "not enough memory");
+		ret = -ENOMEM;
 		goto failed_mount;
 		goto failed_mount;
 	}
 	}
 
 
@@ -3584,6 +3585,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 	}
 	}
 	if (err) {
 	if (err) {
 		ext4_msg(sb, KERN_ERR, "insufficient memory");
 		ext4_msg(sb, KERN_ERR, "insufficient memory");
+		ret = err;
 		goto failed_mount3;
 		goto failed_mount3;
 	}
 	}