]> git.hungrycats.org Git - linux/commitdiff
[PATCH] HPFS: missing lock_kernel() in hpfs_readdir()
authorRené Scharfe <l.s.r@web.de>
Sat, 13 Dec 2003 03:45:10 +0000 (19:45 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Sat, 13 Dec 2003 03:45:10 +0000 (19:45 -0800)
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

index 9f0a0d3b238203a911b717e50c5c56c7d5b630df..92057d8c385935ac3c9816b94e7843d5132dd907 100644 (file)
@@ -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;