Skip to contentSkip to conversation

quota: return -ENOMEM when memory allocation fails

PATCH In review Davidlohr Bueso 2 participants 2 messages Jan 20, 2011 Diskquota

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 quota: return -ENOMEM when memory allocation fails

From: Davidlohr Bueso <[email protected]>

---
 fs/quota/quota_v2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/quota/quota_v2.c +1 -1
index 65444d2..f1ab360 100644
@@ -112,7 +112,7 @@ static int v2_read_file_info(struct super_block *sb, int type)
 	if (!info->dqi_priv) {
 		printk(KERN_WARNING
 		       "Not enough memory for quota information structure.\n");
-		return -1;
+		return -ENOMEM;
 	}
 	qinfo = info->dqi_priv;
 	if (version == 0) {
Signature · 1 line
1.7.1
#1 lore raw
Quoted 1 line · Davidlohr Bueso

From: Davidlohr Bueso <[email protected]>

Thanks. Applied.

Honza

Quoted 24 lines
---
 fs/quota/quota_v2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/quota/quota_v2.c +1 -1
index 65444d2..f1ab360 100644
@@ -112,7 +112,7 @@ static int v2_read_file_info(struct super_block *sb, int type)
 	if (!info->dqi_priv) {
 		printk(KERN_WARNING
 		       "Not enough memory for quota information structure.\n");
-		return -1;
+		return -ENOMEM;
 	}
 	qinfo = info->dqi_priv;
 	if (version == 0) {
Signature · 1 line
1.7.1
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR