summaryrefslogtreecommitdiffstats
path: root/fs/efs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/efs')
-rw-r--r--fs/efs/symlink.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/efs/symlink.c b/fs/efs/symlink.c
index 69b3e77b4..20840409d 100644
--- a/fs/efs/symlink.c
+++ b/fs/efs/symlink.c
@@ -9,6 +9,7 @@
#include <linux/string.h>
#include <linux/efs_fs.h>
#include <linux/pagemap.h>
+#include <linux/smp_lock.h>
static int efs_symlink_readpage(struct file *file, struct page *page)
{
@@ -22,6 +23,7 @@ static int efs_symlink_readpage(struct file *file, struct page *page)
if (size > 2 * EFS_BLOCKSIZE)
goto fail;
+ lock_kernel();
/* read first 512 bytes of link target */
err = -EIO;
bh = bread(inode->i_dev, efs_bmap(inode, 0), EFS_BLOCKSIZE);
@@ -37,11 +39,13 @@ static int efs_symlink_readpage(struct file *file, struct page *page)
brelse(bh);
}
link[size] = '\0';
+ unlock_kernel();
SetPageUptodate(page);
kunmap(page);
UnlockPage(page);
return 0;
fail:
+ unlock_kernel();
SetPageError(page);
kunmap(page);
UnlockPage(page);