ext2: set proper errno in error case of ext2_fill_super()
authorChengguang Xu <cgxu519@mykernel.net>
Fri, 29 Nov 2019 01:36:36 +0000 (09:36 +0800)
committerJan Kara <jack@suse.cz>
Mon, 16 Dec 2019 11:59:14 +0000 (12:59 +0100)
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 <cgxu519@mykernel.net>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext2/super.c

index bcffe25da2f01c3255284d0fa9c599ec3a7b84a5..8643f98e9578dc4461d66e75c0f278513469672d 100644 (file)
@@ -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;
        }