The fix is to check the dentry->d_count, as 2.0.* checked the
inode->i_count. A patch (against 2.1.121 or newer) to do this is below.
(Caveat: newbie submission. If I'm dead wrong, just say so... I'm right
about the bug, anyway. :)
--Patrick
--- linux/mm/swapfile.c.orig Tue Oct 6 03:34:26 1998
+++ linux/mm/swapfile.c Tue Oct 6 04:09:35 1998
@@ -535,6 +535,10 @@
goto bad_swap_2;
p->swap_file = swap_dentry;
+ if (swap_dentry->d_count != 1) {
+ error = -EBUSY;
+ goto bad_swap_2;
+ }
error = -EINVAL;
if (S_ISBLK(swap_dentry->d_inode->i_mode)) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/