aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/mdt.c
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-04-06 19:01:55 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-07 08:31:19 -0700
commit1f5abe7e7dbcd83e73212c6cb135a6106cea6a0b (patch)
treef80e97297d5badebd31bbb17003d76a4ea30453a /fs/nilfs2/mdt.c
parent2c2e52fc4fca251e68f90821c9ff5cb18be4df58 (diff)
downloadkernel_samsung_smdk4412-1f5abe7e7dbcd83e73212c6cb135a6106cea6a0b.zip
kernel_samsung_smdk4412-1f5abe7e7dbcd83e73212c6cb135a6106cea6a0b.tar.gz
kernel_samsung_smdk4412-1f5abe7e7dbcd83e73212c6cb135a6106cea6a0b.tar.bz2
nilfs2: replace BUG_ON and BUG calls triggerable from ioctl
Pekka Enberg advised me: > It would be nice if BUG(), BUG_ON(), and panic() calls would be > converted to proper error handling using WARN_ON() calls. The BUG() > call in nilfs_cpfile_delete_checkpoints(), for example, looks to be > triggerable from user-space via the ioctl() system call. This will follow the comment and keep them to a minimum. Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nilfs2/mdt.c')
-rw-r--r--fs/nilfs2/mdt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c
index e0a632b..47dd815 100644
--- a/fs/nilfs2/mdt.c
+++ b/fs/nilfs2/mdt.c
@@ -154,10 +154,8 @@ nilfs_mdt_submit_block(struct inode *inode, unsigned long blkoff,
ret = -EBUSY;
goto failed_bh;
}
- } else {
- BUG_ON(mode != READ);
+ } else /* mode == READ */
lock_buffer(bh);
- }
if (buffer_uptodate(bh)) {
unlock_buffer(bh);