get rid of BKL in fs/efs
Only readdir() really needed it, and that's easily fixable by switch to generic_file_llseek() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@ -9,7 +9,6 @@
|
||||
#include <linux/string.h>
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include "efs.h"
|
||||
|
||||
static int efs_symlink_readpage(struct file *file, struct page *page)
|
||||
@ -22,9 +21,8 @@ static int efs_symlink_readpage(struct file *file, struct page *page)
|
||||
|
||||
err = -ENAMETOOLONG;
|
||||
if (size > 2 * EFS_BLOCKSIZE)
|
||||
goto fail_notlocked;
|
||||
goto fail;
|
||||
|
||||
lock_kernel();
|
||||
/* read first 512 bytes of link target */
|
||||
err = -EIO;
|
||||
bh = sb_bread(inode->i_sb, efs_bmap(inode, 0));
|
||||
@ -40,14 +38,11 @@ static int efs_symlink_readpage(struct file *file, struct page *page)
|
||||
brelse(bh);
|
||||
}
|
||||
link[size] = '\0';
|
||||
unlock_kernel();
|
||||
SetPageUptodate(page);
|
||||
kunmap(page);
|
||||
unlock_page(page);
|
||||
return 0;
|
||||
fail:
|
||||
unlock_kernel();
|
||||
fail_notlocked:
|
||||
SetPageError(page);
|
||||
kunmap(page);
|
||||
unlock_page(page);
|
||||
|
Reference in New Issue
Block a user