Commit f6d5fc12 authored by Anton Altaparmakov's avatar Anton Altaparmakov

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: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAnton Altaparmakov <aia21@cantab.net>
parent 949fc8d1
......@@ -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.
......
......@@ -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);
}
......
......@@ -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 @@ static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent)
}
/* Errors at this stage are irrelevant. */
err_out_now:
lock_kernel();
sb->s_fs_info = NULL;
kfree(vol);
ntfs_debug("Failed, returning -EINVAL.");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment