]> git.hungrycats.org Git - linux/commitdiff
NTFS: Fix scheduling latencies in ntfs_fill_super() by dropping the BKL
authorAnton Altaparmakov <aia21@cantab.net>
Tue, 14 Sep 2004 15:30:26 +0000 (16:30 +0100)
committerAnton Altaparmakov <aia21@cantab.net>
Tue, 14 Sep 2004 15:30:26 +0000 (16:30 +0100)
      because the code itself is using the ntfs_lock semaphore which
      provides safe locking.  (Ingo Molnar)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
fs/ntfs/ChangeLog
fs/ntfs/debug.c
fs/ntfs/super.c

index fa6d6f48fc62cb7eba7af9e470867d0e44b7c82f..401a3c6fe15013a99ff765af516a37c8f0f95e3c 100644 (file)
@@ -25,6 +25,9 @@ ToDo/Notes:
 
        - 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.
 
index 10038acc7f75c19fdeb60c088d0a724ca788acb5..6723f18264a49fbe032eed10ea68234e5d7159b6 100644 (file)
@@ -127,7 +127,7 @@ void __ntfs_debug (const char *file, int line, const char *function,
        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);
 }
index a4a05cc5e6a012508b53f21c67bfa84f9bf4cd39..4c39039e3d4a4ebe72339570aa7461b78fb5934e 100644 (file)
@@ -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 @@ static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent)
        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 @@ static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent)
                }
                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 @@ iput_tmp_ino_err_out_now:
        }
        /* Errors at this stage are irrelevant. */
 err_out_now:
+       lock_kernel();
        sb->s_fs_info = NULL;
        kfree(vol);
        ntfs_debug("Failed, returning -EINVAL.");