diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-08 00:53:00 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-08 00:53:00 +0000 |
commit | b8553086288629b4efb77e97f5582e08bc50ad65 (patch) | |
tree | 0a19bd1c21e148f35c7a0f76baa4f7a056b966b0 /fs/efs | |
parent | 75b6d92f2dd5112b02f4e78cf9f35f9825946ef0 (diff) |
Merge with 2.4.0-test3-pre4.
Diffstat (limited to 'fs/efs')
-rw-r--r-- | fs/efs/symlink.c | 4 |
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); |