Skip to content

Commit

Permalink
f2fs: change error code to -ENOMEM from -EINVAL
Browse files Browse the repository at this point in the history
The error case of failing allocating memory should
return -ENOMEM.

Signed-off-by: Chengguang Xu <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
Chengguang Xu authored and Jaegeuk Kim committed Feb 4, 2019
1 parent ec19f64 commit 6d4ae78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6d4ae78

Please sign in to comment.