aboutsummaryrefslogtreecommitdiffstats
path: root/fs/qnx4/inode.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-10-21 09:53:15 -0400
committerArnd Bergmann <arnd@arndb.de>2010-10-21 12:48:04 -0400
commit073c21416268658bd1bc573af85eeac2ebb56ed5 (patch)
tree66553303809cc8c1ef7229058d8d5a5670bb301f /fs/qnx4/inode.c
parent5a44a73b9015e89cfb280ba0534dfcbf1ef29d05 (diff)
BKL: remove BKL from qnx4
All uses of the BKL in qnx4 were the result of a pushdown into code that doesn't really need it. As Christoph points out, this is a read-only file system, which eliminates most of the races in readdir/lookup. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Anders Larsen <al@alarsen.net> Cc: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'fs/qnx4/inode.c')
-rw-r--r--fs/qnx4/inode.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c
index 86a7be1399a8..01bad30026fc 100644
--- a/fs/qnx4/inode.c
+++ b/fs/qnx4/inode.c
@@ -16,7 +16,6 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/slab.h> 17#include <linux/slab.h>
18#include <linux/highuid.h> 18#include <linux/highuid.h>
19#include <linux/smp_lock.h>
20#include <linux/pagemap.h> 19#include <linux/pagemap.h>
21#include <linux/buffer_head.h> 20#include <linux/buffer_head.h>
22#include <linux/writeback.h> 21#include <linux/writeback.h>
@@ -157,8 +156,6 @@ static int qnx4_statfs(struct dentry *dentry, struct kstatfs *buf)
157 struct super_block *sb = dentry->d_sb; 156 struct super_block *sb = dentry->d_sb;
158 u64 id = huge_encode_dev(sb->s_bdev->bd_dev); 157 u64 id = huge_encode_dev(sb->s_bdev->bd_dev);
159 158
160 lock_kernel();
161
162 buf->f_type = sb->s_magic; 159 buf->f_type = sb->s_magic;
163 buf->f_bsize = sb->s_blocksize; 160 buf->f_bsize = sb->s_blocksize;
164 buf->f_blocks = le32_to_cpu(qnx4_sb(sb)->BitMap->di_size) * 8; 161 buf->f_blocks = le32_to_cpu(qnx4_sb(sb)->BitMap->di_size) * 8;
@@ -168,8 +165,6 @@ static int qnx4_statfs(struct dentry *dentry, struct kstatfs *buf)
168 buf->f_fsid.val[0] = (u32)id; 165 buf->f_fsid.val[0] = (u32)id;
169 buf->f_fsid.val[1] = (u32)(id >> 32); 166 buf->f_fsid.val[1] = (u32)(id >> 32);
170 167
171 unlock_kernel();
172
173 return 0; 168 return 0;
174} 169}
175 170
@@ -234,13 +229,9 @@ static int qnx4_fill_super(struct super_block *s, void *data, int silent)
234 struct qnx4_sb_info *qs; 229 struct qnx4_sb_info *qs;
235 int ret = -EINVAL; 230 int ret = -EINVAL;
236 231
237 lock_kernel();
238
239 qs = kzalloc(sizeof(struct qnx4_sb_info), GFP_KERNEL); 232 qs = kzalloc(sizeof(struct qnx4_sb_info), GFP_KERNEL);
240 if (!qs) { 233 if (!qs)
241 unlock_kernel();
242 return -ENOMEM; 234 return -ENOMEM;
243 }
244 s->s_fs_info = qs; 235 s->s_fs_info = qs;
245 236
246 sb_set_blocksize(s, QNX4_BLOCK_SIZE); 237 sb_set_blocksize(s, QNX4_BLOCK_SIZE);
@@ -287,8 +278,6 @@ static int qnx4_fill_super(struct super_block *s, void *data, int silent)
287 goto outi; 278 goto outi;
288 279
289 brelse(bh); 280 brelse(bh);
290
291 unlock_kernel();
292 return 0; 281 return 0;
293 282
294 outi: 283 outi:
@@ -298,7 +287,6 @@ static int qnx4_fill_super(struct super_block *s, void *data, int silent)
298 outnobh: 287 outnobh:
299 kfree(qs); 288 kfree(qs);
300 s->s_fs_info = NULL; 289 s->s_fs_info = NULL;
301 unlock_kernel();
302 return ret; 290 return ret;
303} 291}
304 292