[Top] [All Lists]

[PATCH] xfs: Fix incorrect positive ENOMEM return

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: [PATCH] xfs: Fix incorrect positive ENOMEM return
From: Joe Perches <joe@xxxxxxxxxxx>
Date: Sun, 22 Mar 2015 12:03:27 -0700
Cc: xfs <xfs@xxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
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.

Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
 fs/xfs/xfs_super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 3ad0b17..8782b36 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -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)

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] xfs: Fix incorrect positive ENOMEM return, Joe Perches <=