Commit 14c5d2d2 authored by René Scharfe's avatar René Scharfe Committed by Linus Torvalds

[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.
parent 5965168e
...@@ -65,6 +65,8 @@ int hpfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -65,6 +65,8 @@ int hpfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
int c1, c2 = 0; int c1, c2 = 0;
int ret = 0; int ret = 0;
lock_kernel();
if (hpfs_sb(inode->i_sb)->sb_chk) { if (hpfs_sb(inode->i_sb)->sb_chk) {
if (hpfs_chk_sectors(inode->i_sb, inode->i_ino, 1, "dir_fnode")) { if (hpfs_chk_sectors(inode->i_sb, inode->i_ino, 1, "dir_fnode")) {
ret = -EFSERROR; ret = -EFSERROR;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment