Skip to content

Commit 5ac3455

Browse files
author
Al Viro
committed
get rid of BKL in fs/sysv
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent cc46759 commit 5ac3455

2 files changed

Lines changed: 1 addition & 15 deletions

File tree

‎fs/sysv/dir.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515

1616
#include <linux/pagemap.h>
1717
#include <linux/highmem.h>
18-
#include <linux/smp_lock.h>
1918
#include <linux/swap.h>
2019
#include "sysv.h"
2120

2221
static int sysv_readdir(struct file *, void *, filldir_t);
2322

2423
const struct file_operations sysv_dir_operations = {
24+
.llseek = generic_file_llseek,
2525
.read = generic_read_dir,
2626
.readdir = sysv_readdir,
2727
.fsync = simple_fsync,
@@ -74,8 +74,6 @@ static int sysv_readdir(struct file * filp, void * dirent, filldir_t filldir)
7474
unsigned long n = pos >> PAGE_CACHE_SHIFT;
7575
unsigned long npages = dir_pages(inode);
7676

77-
lock_kernel();
78-
7977
pos = (pos + SYSV_DIRSIZE-1) & ~(SYSV_DIRSIZE-1);
8078
if (pos >= inode->i_size)
8179
goto done;
@@ -113,7 +111,6 @@ static int sysv_readdir(struct file * filp, void * dirent, filldir_t filldir)
113111

114112
done:
115113
filp->f_pos = ((loff_t)n << PAGE_CACHE_SHIFT) | offset;
116-
unlock_kernel();
117114
return 0;
118115
}
119116

‎fs/sysv/inode.c‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
* the superblock.
2222
*/
2323

24-
#include <linux/smp_lock.h>
2524
#include <linux/highuid.h>
2625
#include <linux/slab.h>
2726
#include <linux/init.h>
@@ -37,7 +36,6 @@ static int sysv_sync_fs(struct super_block *sb, int wait)
3736
unsigned long time = get_seconds(), old_time;
3837

3938
lock_super(sb);
40-
lock_kernel();
4139

4240
/*
4341
* If we are going to write out the super block,
@@ -52,7 +50,6 @@ static int sysv_sync_fs(struct super_block *sb, int wait)
5250
mark_buffer_dirty(sbi->s_bh2);
5351
}
5452

55-
unlock_kernel();
5653
unlock_super(sb);
5754

5855
return 0;
@@ -82,8 +79,6 @@ static void sysv_put_super(struct super_block *sb)
8279
{
8380
struct sysv_sb_info *sbi = SYSV_SB(sb);
8481

85-
lock_kernel();
86-
8782
if (sb->s_dirt)
8883
sysv_write_super(sb);
8984

@@ -99,8 +94,6 @@ static void sysv_put_super(struct super_block *sb)
9994
brelse(sbi->s_bh2);
10095

10196
kfree(sbi);
102-
103-
unlock_kernel();
10497
}
10598

10699
static int sysv_statfs(struct dentry *dentry, struct kstatfs *buf)
@@ -275,7 +268,6 @@ int sysv_write_inode(struct inode *inode, int wait)
275268
return -EIO;
276269
}
277270

278-
lock_kernel();
279271
raw_inode->i_mode = cpu_to_fs16(sbi, inode->i_mode);
280272
raw_inode->i_uid = cpu_to_fs16(sbi, fs_high2lowuid(inode->i_uid));
281273
raw_inode->i_gid = cpu_to_fs16(sbi, fs_high2lowgid(inode->i_gid));
@@ -291,7 +283,6 @@ int sysv_write_inode(struct inode *inode, int wait)
291283
for (block = 0; block < 10+1+1+1; block++)
292284
write3byte(sbi, (u8 *)&si->i_data[block],
293285
&raw_inode->i_data[3*block]);
294-
unlock_kernel();
295286
mark_buffer_dirty(bh);
296287
if (wait) {
297288
sync_dirty_buffer(bh);
@@ -315,9 +306,7 @@ static void sysv_delete_inode(struct inode *inode)
315306
truncate_inode_pages(&inode->i_data, 0);
316307
inode->i_size = 0;
317308
sysv_truncate(inode);
318-
lock_kernel();
319309
sysv_free_inode(inode);
320-
unlock_kernel();
321310
}
322311

323312
static struct kmem_cache *sysv_inode_cachep;

0 commit comments

Comments
 (0)