OSDN Git Service

f2fs: change error code to -ENOMEM from -EINVAL
authorChengguang Xu <cgxu519@gmx.com>
Tue, 1 Jan 2019 13:33:11 +0000 (21:33 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 8 Jan 2019 17:34:27 +0000 (09:34 -0800)
The error case of failing allocating memory should
return -ENOMEM.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/super.c

index 14f033e..bc32a10 100644 (file)
@@ -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)