Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

get rid of BKL in fs/sysv

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 5ac3455a cc46759a

+1 -15
+1 -4
fs/sysv/dir.c
··· 15 15 16 16 #include <linux/pagemap.h> 17 17 #include <linux/highmem.h> 18 - #include <linux/smp_lock.h> 19 18 #include <linux/swap.h> 20 19 #include "sysv.h" 21 20 22 21 static int sysv_readdir(struct file *, void *, filldir_t); 23 22 24 23 const struct file_operations sysv_dir_operations = { 24 + .llseek = generic_file_llseek, 25 25 .read = generic_read_dir, 26 26 .readdir = sysv_readdir, 27 27 .fsync = simple_fsync, ··· 74 74 unsigned long n = pos >> PAGE_CACHE_SHIFT; 75 75 unsigned long npages = dir_pages(inode); 76 76 77 - lock_kernel(); 78 - 79 77 pos = (pos + SYSV_DIRSIZE-1) & ~(SYSV_DIRSIZE-1); 80 78 if (pos >= inode->i_size) 81 79 goto done; ··· 111 113 112 114 done: 113 115 filp->f_pos = ((loff_t)n << PAGE_CACHE_SHIFT) | offset; 114 - unlock_kernel(); 115 116 return 0; 116 117 } 117 118
-11
fs/sysv/inode.c
··· 21 21 * the superblock. 22 22 */ 23 23 24 - #include <linux/smp_lock.h> 25 24 #include <linux/highuid.h> 26 25 #include <linux/slab.h> 27 26 #include <linux/init.h> ··· 36 37 unsigned long time = get_seconds(), old_time; 37 38 38 39 lock_super(sb); 39 - lock_kernel(); 40 40 41 41 /* 42 42 * If we are going to write out the super block, ··· 50 52 mark_buffer_dirty(sbi->s_bh2); 51 53 } 52 54 53 - unlock_kernel(); 54 55 unlock_super(sb); 55 56 56 57 return 0; ··· 79 82 { 80 83 struct sysv_sb_info *sbi = SYSV_SB(sb); 81 84 82 - lock_kernel(); 83 - 84 85 if (sb->s_dirt) 85 86 sysv_write_super(sb); 86 87 ··· 94 99 brelse(sbi->s_bh2); 95 100 96 101 kfree(sbi); 97 - 98 - unlock_kernel(); 99 102 } 100 103 101 104 static int sysv_statfs(struct dentry *dentry, struct kstatfs *buf) ··· 268 275 return -EIO; 269 276 } 270 277 271 - lock_kernel(); 272 278 raw_inode->i_mode = cpu_to_fs16(sbi, inode->i_mode); 273 279 raw_inode->i_uid = cpu_to_fs16(sbi, fs_high2lowuid(inode->i_uid)); 274 280 raw_inode->i_gid = cpu_to_fs16(sbi, fs_high2lowgid(inode->i_gid)); ··· 283 291 for (block = 0; block < 10+1+1+1; block++) 284 292 write3byte(sbi, (u8 *)&si->i_data[block], 285 293 &raw_inode->i_data[3*block]); 286 - unlock_kernel(); 287 294 mark_buffer_dirty(bh); 288 295 if (wait) { 289 296 sync_dirty_buffer(bh); ··· 306 315 truncate_inode_pages(&inode->i_data, 0); 307 316 inode->i_size = 0; 308 317 sysv_truncate(inode); 309 - lock_kernel(); 310 318 sysv_free_inode(inode); 311 - unlock_kernel(); 312 319 } 313 320 314 321 static struct kmem_cache *sysv_inode_cachep;