patch-2.4.0-test3 linux/fs/affs/symlink.c
Next file: linux/fs/autofs/root.c
Previous file: linux/fs/affs/inode.c
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Wed Jul 5 11:31:01 2000
- Orig file:
v2.4.0-test2/linux/fs/affs/symlink.c
- Orig date:
Thu May 11 15:30:08 2000
diff -u --recursive --new-file v2.4.0-test2/linux/fs/affs/symlink.c linux/fs/affs/symlink.c
@@ -14,6 +14,7 @@
#include <linux/affs_fs.h>
#include <linux/amigaffs.h>
#include <linux/pagemap.h>
+#include <linux/smp_lock.h>
static int affs_symlink_readpage(struct file *file, struct page *page)
{
@@ -30,7 +31,9 @@
pr_debug("AFFS: follow_link(ino=%lu)\n",inode->i_ino);
err = -EIO;
+ lock_kernel();
bh = affs_bread(inode->i_dev,inode->i_ino,AFFS_I2BSIZE(inode));
+ unlock_kernel();
if (!bh)
goto fail;
i = 0;
@@ -59,7 +62,9 @@
j++;
}
link[i] = '\0';
+ lock_kernel();
affs_brelse(bh);
+ unlock_kernel();
SetPageUptodate(page);
kunmap(page);
UnlockPage(page);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)