diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-01-22 20:26:12 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-03-02 22:27:36 +0100 |
commit | 9a311b96c3065f362e3348cb5d7af1a57ca6bff9 (patch) | |
tree | aed281e9ff7c5e689895ff838e886dff77e3e2e9 /fs/hpfs/file.c | |
parent | 5edc341313a188d94cde7ef87ac31647cea8601a (diff) | |
download | linux-9a311b96c3065f362e3348cb5d7af1a57ca6bff9.tar.gz linux-9a311b96c3065f362e3348cb5d7af1a57ca6bff9.tar.bz2 linux-9a311b96c3065f362e3348cb5d7af1a57ca6bff9.zip |
hpfs: remove the BKL
This removes the BKL in hpfs in a rather awful
way, by making the code only work on uniprocessor
systems without kernel preemption, as suggested
by Andi Kleen.
The HPFS code probably has close to zero remaining
users on current kernels, all archeological uses of
the file system can probably be done with the significant
restrictions.
The hpfs_lock/hpfs_unlock functions are left in the
code, sincen Mikulas has indicated that he is still
interested in fixing it in a better way.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Andi Kleen <ak@linux.intel.com>
Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Cc: linux-fsdevel@vger.kernel.org
Diffstat (limited to 'fs/hpfs/file.c')
-rw-r--r-- | fs/hpfs/file.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/hpfs/file.c b/fs/hpfs/file.c index c0340887c7ea..2dbae20450f8 100644 --- a/fs/hpfs/file.c +++ b/fs/hpfs/file.c @@ -6,16 +6,15 @@ * file VFS functions */ -#include <linux/smp_lock.h> #include "hpfs_fn.h" #define BLOCKS(size) (((size) + 511) >> 9) static int hpfs_file_release(struct inode *inode, struct file *file) { - lock_kernel(); + hpfs_lock(inode->i_sb); hpfs_write_if_changed(inode); - unlock_kernel(); + hpfs_unlock(inode->i_sb); return 0; } @@ -49,14 +48,14 @@ static secno hpfs_bmap(struct inode *inode, unsigned file_secno) static void hpfs_truncate(struct inode *i) { if (IS_IMMUTABLE(i)) return /*-EPERM*/; - lock_kernel(); + hpfs_lock(i->i_sb); hpfs_i(i)->i_n_secs = 0; i->i_blocks = 1 + ((i->i_size + 511) >> 9); hpfs_i(i)->mmu_private = i->i_size; hpfs_truncate_btree(i->i_sb, i->i_ino, 1, ((i->i_size + 511) >> 9)); hpfs_write_inode(i); hpfs_i(i)->i_n_secs = 0; - unlock_kernel(); + hpfs_unlock(i->i_sb); } static int hpfs_get_block(struct inode *inode, sector_t iblock, struct buffer_head *bh_result, int create) |