[PATCH 2/7] Re: [2.6-BK-URL] NTFS 2.1.18 release

From: Anton Altaparmakov
Date: Wed Sep 22 2004 - 07:19:41 EST


This is patch 2/7 in the series. It contains the following ChangeSet:

<aia21@xxxxxxxxxx> (04/09/14 1.1864.1.2)
NTFS: Fix scheduling latencies in ntfs_fill_super() by dropping the BKL
because the code itself is using the ntfs_lock semaphore which
provides safe locking. (Ingo Molnar)

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Anton Altaparmakov <aia21@xxxxxxxxxx>

Best regards,

Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/, http://www-stu.christs.cam.ac.uk/~aia21/

===================================================================

diff -Nru a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog
--- a/fs/ntfs/ChangeLog 2004-09-22 13:02:37 +01:00
+++ b/fs/ntfs/ChangeLog 2004-09-22 13:02:37 +01:00
@@ -25,6 +25,9 @@

- Remove vol->nr_mft_records as it was pretty meaningless and optimize
the calculation of total/free inodes as used by statfs().
+ - Fix scheduling latencies in ntfs_fill_super() by dropping the BKL
+ because the code itself is using the ntfs_lock semaphore which
+ provides safe locking. (Ingo Molnar)

2.1.17 - Fix bugs in mount time error code paths and other updates.

diff -Nru a/fs/ntfs/debug.c b/fs/ntfs/debug.c
--- a/fs/ntfs/debug.c 2004-09-22 13:02:37 +01:00
+++ b/fs/ntfs/debug.c 2004-09-22 13:02:37 +01:00
@@ -127,7 +127,7 @@
va_start(args, fmt);
vsnprintf(err_buf, sizeof(err_buf), fmt, args);
va_end(args);
- printk(KERN_DEBUG "NTFS-fs DEBUG (%s, %d): %s: %s\n",
+ printk(KERN_DEBUG "NTFS-fs DEBUG (%s, %d): %s(): %s\n",
file, line, flen ? function : "", err_buf);
spin_unlock(&err_buf_lock);
}
diff -Nru a/fs/ntfs/super.c b/fs/ntfs/super.c
--- a/fs/ntfs/super.c 2004-09-22 13:02:37 +01:00
+++ b/fs/ntfs/super.c 2004-09-22 13:02:37 +01:00
@@ -29,6 +29,7 @@
#include <linux/buffer_head.h>
#include <linux/vfs.h>
#include <linux/moduleparam.h>
+#include <linux/smp_lock.h>

#include "ntfs.h"
#include "sysctl.h"
@@ -2291,6 +2292,8 @@
vol->fmask = 0177;
vol->dmask = 0077;

+ unlock_kernel();
+
/* Important to get the mount options dealt with now. */
if (!parse_options(vol, (char*)opt))
goto err_out_now;
@@ -2427,6 +2430,7 @@
}
up(&ntfs_lock);
sb->s_export_op = &ntfs_export_ops;
+ lock_kernel();
return 0;
}
ntfs_error(sb, "Failed to allocate root directory.");
@@ -2530,6 +2534,7 @@
}
/* Errors at this stage are irrelevant. */
err_out_now:
+ lock_kernel();
sb->s_fs_info = NULL;
kfree(vol);
ntfs_debug("Failed, returning -EINVAL.");
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/