From 14c5d2d2e97f75e744fd7b62c8e5bd826c1402c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ren=C3=A9=20Scharfe?= Date: Fri, 12 Dec 2003 19:45:10 -0800 Subject: [PATCH] [PATCH] HPFS: missing lock_kernel() in hpfs_readdir() In 2.5.x, 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. This adds the missing lock_kernel(). It's been tested by Timo Maier who also reported the problem earlier today. --- fs/hpfs/dir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/hpfs/dir.c b/fs/hpfs/dir.c index 9f0a0d3b23820..92057d8c38593 100644 --- a/fs/hpfs/dir.c +++ b/fs/hpfs/dir.c @@ -65,6 +65,8 @@ int hpfs_readdir(struct file *filp, void *dirent, filldir_t filldir) 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; -- 2.53.0