Skip to contentSkip to conversation

xfs: Fix incorrect positive ENOMEM return

PATCH New Joe Perches 1 participant 1 message Mar 22, 2015 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: Fix incorrect positive ENOMEM return

commit 5681ca40064f ("xfs: Remove icsb infrastructure") incorrectly added a positive error return value.

This value filters up through the return layers and should be negative as the other return values are in the same function.

---
 fs/xfs/xfs_super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_super.c +1 -1
index 3ad0b17..8782b36 100644
@@ -1380,7 +1380,7 @@ xfs_init_percpu_counters(
 
 	error = percpu_counter_init(&mp->m_icount, 0, GFP_KERNEL);
 	if (error)
-		return ENOMEM;
+		return -ENOMEM;
 
 	error = percpu_counter_init(&mp->m_ifree, 0, GFP_KERNEL);
 	if (error)