From: Chengguang Xu Date: Fri, 29 Nov 2019 01:36:36 +0000 (+0800) Subject: ext2: set proper errno in error case of ext2_fill_super() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=34e92542da964304f41f97deee6e34085ad8106b;p=linux.git ext2: set proper errno in error case of ext2_fill_super() Set proper errno in the case of failure of initializing percpu variables. Link: https://lore.kernel.org/r/20191129013636.7624-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara --- diff --git a/fs/ext2/super.c b/fs/ext2/super.c index bcffe25da2f01..8643f98e9578d 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -1138,6 +1138,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) ext2_count_dirs(sb), GFP_KERNEL); } if (err) { + ret = err; ext2_msg(sb, KERN_ERR, "error: insufficient memory"); goto failed_mount3; }