lkml.org 
[lkml]   [2002]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject2.5.2: swapon failing with errno=0 (sys_swapon)
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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:23    [W:0.031 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site