[PATCH][2.6] HPFS: missing lock_kernel() in hpfs_readdir()

From: Rene Scharfe
Date: Sat Dec 13 2003 - 13:30:57 EST


Hi Linus,

recently the BKL was pushed from vfs_readdir() into the filesystem
specific functions. But only the unlock_kernel() made it into the HPFS
code, lock_kernel() got lost on the way. This rendered the filesystem
unusable.

The patch below adds the missing lock_kernel(). It's been tested by Timo
Maier who also reported the problem earlier today.

Please apply.

Thanks,
René



--- linux-2.6.0-test11/fs/hpfs/dir.c~ 2003-11-26 21:43:26.000000000 +0100
+++ linux-2.6.0-test11/fs/hpfs/dir.c 2003-12-13 16:52:17.000000000 +0100
@@ -65,6 +65,8 @@
int c1, c2 = 0;
int ret = 0;

+ lock_kernel();
+
if (hpfs_sb(inode->i_sb)->sb_chk) {
if (hpfs_chk_sectors(inode->i_sb, inode->i_ino, 1, "dir_fnode")) {
ret = -EFSERROR;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/