aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-06-16 23:59:37 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-17 00:36:37 -0400
commit5ac3455a843d2ca77333c954eea83aa4514c8199 (patch)
tree12c12ef1dd13a1bd9a8b61ec9af1f2cc3d845ba5
parentcc46759a8c0ac4c6f13aa4b0f470305c05f600e1 (diff)
get rid of BKL in fs/sysv
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/sysv/dir.c5
-rw-r--r--fs/sysv/inode.c11
2 files changed, 1 insertions, 15 deletions
diff --git a/fs/sysv/dir.c b/fs/sysv/dir.c
index c7798079e644..4e50286a4cc3 100644
--- a/fs/sysv/dir.c
+++ b/fs/sysv/dir.c
@@ -15,13 +15,13 @@
15 15
16#include <linux/pagemap.h> 16#include <linux/pagemap.h>
17#include <linux/highmem.h> 17#include <linux/highmem.h>
18#include <linux/smp_lock.h>
19#include <linux/swap.h> 18#include <linux/swap.h>
20#include "sysv.h" 19#include "sysv.h"
21 20
22static int sysv_readdir(struct file *, void *, filldir_t); 21static int sysv_readdir(struct file *, void *, filldir_t);
23 22
24const struct file_operations sysv_dir_operations = { 23const struct file_operations sysv_dir_operations = {
24 .llseek = generic_file_llseek,
25 .read = generic_read_dir, 25 .read = generic_read_dir,
26 .readdir = sysv_readdir, 26 .readdir = sysv_readdir,
27 .fsync = simple_fsync, 27 .fsync = simple_fsync,
@@ -74,8 +74,6 @@ static int sysv_readdir(struct file * filp, void * dirent, filldir_t filldir)
74 unsigned long n = pos >> PAGE_CACHE_SHIFT; 74 unsigned long n = pos >> PAGE_CACHE_SHIFT;
75 unsigned long npages = dir_pages(inode); 75 unsigned long npages = dir_pages(inode);
76 76
77 lock_kernel();
78
79 pos = (pos + SYSV_DIRSIZE-1) & ~(SYSV_DIRSIZE-1); 77 pos = (pos + SYSV_DIRSIZE-1) & ~(SYSV_DIRSIZE-1);
80 if (pos >= inode->i_size) 78 if (pos >= inode->i_size)
81 goto done; 79 goto done;
@@ -113,7 +111,6 @@ static int sysv_readdir(struct file * filp, void * dirent, filldir_t filldir)
113 111
114done: 112done:
115 filp->f_pos = ((loff_t)n << PAGE_CACHE_SHIFT) | offset; 113 filp->f_pos = ((loff_t)n << PAGE_CACHE_SHIFT) | offset;
116 unlock_kernel();
117 return 0; 114 return 0;
118} 115}
119 116
diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c
index 479923456a54..9824743832a7 100644
--- a/fs/sysv/inode.c
+++ b/fs/sysv/inode.c
@@ -21,7 +21,6 @@
21 * the superblock. 21 * the superblock.
22 */ 22 */
23 23
24#include <linux/smp_lock.h>
25#include <linux/highuid.h> 24#include <linux/highuid.h>
26#include <linux/slab.h> 25#include <linux/slab.h>
27#include <linux/init.h> 26#include <linux/init.h>
@@ -37,7 +36,6 @@ static int sysv_sync_fs(struct super_block *sb, int wait)
37 unsigned long time = get_seconds(), old_time; 36 unsigned long time = get_seconds(), old_time;
38 37
39 lock_super(sb); 38 lock_super(sb);
40 lock_kernel();
41 39
42 /* 40 /*
43 * If we are going to write out the super block, 41 * 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)
52 mark_buffer_dirty(sbi->s_bh2); 50 mark_buffer_dirty(sbi->s_bh2);
53 } 51 }
54 52
55 unlock_kernel();
56 unlock_super(sb); 53 unlock_super(sb);
57 54
58 return 0; 55 return 0;
@@ -82,8 +79,6 @@ static void sysv_put_super(struct super_block *sb)
82{ 79{
83 struct sysv_sb_info *sbi = SYSV_SB(sb); 80 struct sysv_sb_info *sbi = SYSV_SB(sb);
84 81
85 lock_kernel();
86
87 if (sb->s_dirt) 82 if (sb->s_dirt)
88 sysv_write_super(sb); 83 sysv_write_super(sb);
89 84
@@ -99,8 +94,6 @@ static void sysv_put_super(struct super_block *sb)
99 brelse(sbi->s_bh2); 94 brelse(sbi->s_bh2);
100 95
101 kfree(sbi); 96 kfree(sbi);
102
103 unlock_kernel();
104} 97}
105 98
106static int sysv_statfs(struct dentry *dentry, struct kstatfs *buf) 99static int sysv_statfs(struct dentry *dentry, struct kstatfs *buf)
@@ -275,7 +268,6 @@ int sysv_write_inode(struct inode *inode, int wait)
275 return -EIO; 268 return -EIO;
276 } 269 }
277 270
278 lock_kernel();
279 raw_inode->i_mode = cpu_to_fs16(sbi, inode->i_mode); 271 raw_inode->i_mode = cpu_to_fs16(sbi, inode->i_mode);
280 raw_inode->i_uid = cpu_to_fs16(sbi, fs_high2lowuid(inode->i_uid)); 272 raw_inode->i_uid = cpu_to_fs16(sbi, fs_high2lowuid(inode->i_uid));
281 raw_inode->i_gid = cpu_to_fs16(sbi, fs_high2lowgid(inode->i_gid)); 273 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)
291 for (block = 0; block < 10+1+1+1; block++) 283 for (block = 0; block < 10+1+1+1; block++)
292 write3byte(sbi, (u8 *)&si->i_data[block], 284 write3byte(sbi, (u8 *)&si->i_data[block],
293 &raw_inode->i_data[3*block]); 285 &raw_inode->i_data[3*block]);
294 unlock_kernel();
295 mark_buffer_dirty(bh); 286 mark_buffer_dirty(bh);
296 if (wait) { 287 if (wait) {
297 sync_dirty_buffer(bh); 288 sync_dirty_buffer(bh);
@@ -315,9 +306,7 @@ static void sysv_delete_inode(struct inode *inode)
315 truncate_inode_pages(&inode->i_data, 0); 306 truncate_inode_pages(&inode->i_data, 0);
316 inode->i_size = 0; 307 inode->i_size = 0;
317 sysv_truncate(inode); 308 sysv_truncate(inode);
318 lock_kernel();
319 sysv_free_inode(inode); 309 sysv_free_inode(inode);
320 unlock_kernel();
321} 310}
322 311
323static struct kmem_cache *sysv_inode_cachep; 312static struct kmem_cache *sysv_inode_cachep;