Skip to contentSkip to conversation

f2fs: change error code to -ENOMEM from -EINVAL

PATCH In review Chengguang Xu 2 participants 2 messages Jan 1, 2019 – Jan 3, 2019 F2FS file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs: change error code to -ENOMEM from -EINVAL

The error case of failing allocating memory should return -ENOMEM.

---
 fs/f2fs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/super.c +1 -1
index af58b2cc21b8..913274365f93 100644
@@ -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)
Signature · 1 line
2.17.2