From: Chengguang Xu Date: Tue, 1 Jan 2019 13:33:11 +0000 (+0800) Subject: f2fs: change error code to -ENOMEM from -EINVAL X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=f365c6cc85b1d2348d73bf327258874fcc7ac161;p=openwrt%2Fstaging%2Fblogic.git f2fs: change error code to -ENOMEM from -EINVAL The error case of failing allocating memory should return -ENOMEM. Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 14f033e1ab42..bc32a1035f65 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -269,7 +269,7 @@ static int f2fs_set_qf_name(struct super_block *sb, int qtype, if (!qname) { f2fs_msg(sb, KERN_ERR, "Not enough memory for storing quotafile name"); - return -EINVAL; + return -ENOMEM; } if (F2FS_OPTION(sbi).s_qf_names[qtype]) { if (strcmp(F2FS_OPTION(sbi).s_qf_names[qtype], qname) == 0)