aboutsummaryrefslogtreecommitdiffstats
path: root/fs/efs/dir.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-06-16 23:35:46 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-17 00:36:36 -0400
commite7ec952f6aa6ac1649ac49eb5e4de5b92c829d1e (patch)
treecfe58a2f9b82ab94bd5ddbbaefb38b4790bdc65c /fs/efs/dir.c
parent536c94901eb8f2eb6fccf81ae6be814899a9f6e8 (diff)
get rid of BKL in fs/efs
Only readdir() really needed it, and that's easily fixable by switch to generic_file_llseek() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/efs/dir.c')
-rw-r--r--fs/efs/dir.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/efs/dir.c b/fs/efs/dir.c
index 49308a29798a..7ee6f7e3a608 100644
--- a/fs/efs/dir.c
+++ b/fs/efs/dir.c
@@ -5,12 +5,12 @@
5 */ 5 */
6 6
7#include <linux/buffer_head.h> 7#include <linux/buffer_head.h>
8#include <linux/smp_lock.h>
9#include "efs.h" 8#include "efs.h"
10 9
11static int efs_readdir(struct file *, void *, filldir_t); 10static int efs_readdir(struct file *, void *, filldir_t);
12 11
13const struct file_operations efs_dir_operations = { 12const struct file_operations efs_dir_operations = {
13 .llseek = generic_file_llseek,
14 .read = generic_read_dir, 14 .read = generic_read_dir,
15 .readdir = efs_readdir, 15 .readdir = efs_readdir,
16}; 16};
@@ -33,8 +33,6 @@ static int efs_readdir(struct file *filp, void *dirent, filldir_t filldir) {
33 if (inode->i_size & (EFS_DIRBSIZE-1)) 33 if (inode->i_size & (EFS_DIRBSIZE-1))
34 printk(KERN_WARNING "EFS: WARNING: readdir(): directory size not a multiple of EFS_DIRBSIZE\n"); 34 printk(KERN_WARNING "EFS: WARNING: readdir(): directory size not a multiple of EFS_DIRBSIZE\n");
35 35
36 lock_kernel();
37
38 /* work out where this entry can be found */ 36 /* work out where this entry can be found */
39 block = filp->f_pos >> EFS_DIRBSIZE_BITS; 37 block = filp->f_pos >> EFS_DIRBSIZE_BITS;
40 38
@@ -107,7 +105,6 @@ static int efs_readdir(struct file *filp, void *dirent, filldir_t filldir) {
107 105
108 filp->f_pos = (block << EFS_DIRBSIZE_BITS) | slot; 106 filp->f_pos = (block << EFS_DIRBSIZE_BITS) | slot;
109out: 107out:
110 unlock_kernel();
111 return 0; 108 return 0;
112} 109}
113 110