xfs
[Top] [All Lists]

[PATCH 3/9] xfsdump: fix wrong test for hard stack limit change failure

To: xfs@xxxxxxxxxxx
Subject: [PATCH 3/9] xfsdump: fix wrong test for hard stack limit change failure
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Wed, 12 Nov 2014 12:57:12 -0600
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1415818638-32700-1-git-send-email-sandeen@xxxxxxxxxx>
References: <1415818638-32700-1-git-send-email-sandeen@xxxxxxxxxx>
We test if ( rlimit64.rlim_cur < minstacksz ) to see whether
we failed to increase rlimit64.rlim_max?  Weird.  Fix it.

(Granted, we raise both cur and max together, but it's odd to test
one, and report the other).

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---
 common/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/main.c b/common/main.c
index 8e7451f..326f801 100644
--- a/common/main.c
+++ b/common/main.c
@@ -2077,7 +2077,7 @@ set_rlimits( size64_t *vmszp )
                        ( void )setrlimit64( RLIMIT_STACK, &rlimit64 );
                        rval = getrlimit64( RLIMIT_STACK, &rlimit64 );
                        ASSERT( ! rval );
-                       if ( rlimit64.rlim_cur < minstacksz ) {
+                       if ( rlimit64.rlim_max < minstacksz ) {
                                mlog( MLOG_NORMAL
                                      |
                                      MLOG_WARNING
-- 
1.7.1

<Prev in Thread] Current Thread [Next in Thread>