linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Riesen <riesen@synopsys.COM>
To: linux-kernel@vger.kernel.org
Subject: 2.5.2: swapon failing with errno=0 (sys_swapon) (repost)
Date: Thu, 17 Jan 2002 18:14:34 +0100	[thread overview]
Message-ID: <20020117181434.A13576@riesen-pc.gr05.synopsys.com> (raw)

I'm not cc'ing someone personally (because i don't know
whom to address), so i just repost the patch, in case
noone have seen it. The thing really disabled swap,
although maybe noone is really need it for 2.5.2 ;)

repost:
Tried to use 2.5.2. And got the message from swapon:
swapon: /dev/hda6: Success

strace showed some strange return value from swapon(2),
looking like a pointer.

The patch will cure the problem, though i'm not sure
about the reasons setting the error to pointer.
Are the kernel pointers handled specially in errors?
-alex

--- linux/mm/swapfile.c Mon Jan 14 18:38:36 2002
+++ linux/mm/swapfile.c-        Thu Jan 17 08:50:28 2002
@@ -904,7 +904,7 @@
        swap_file = filp_open(name, O_RDWR, 0);
        putname(name);
        error = PTR_ERR(swap_file);
-       if (error)
+       if (IS_ERR(swap_file))
                goto bad_swap_2;
 
        p->swap_file = swap_file;


                 reply	other threads:[~2002-01-17 17:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020117181434.A13576@riesen-pc.gr05.synopsys.com \
    --to=riesen@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).