diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-28 18:48:53 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-28 18:48:53 -0800 |
commit | 64a028a6de08545a2c94f302bc7694bf48aee5b5 (patch) | |
tree | d01fd905efb117cb5b00443464073a6539a23684 /fs/affs/symlink.c | |
parent | 3d29935ff0773fe466e957f17284ca777a2aaa89 (diff) | |
parent | 12e9a45609054fb83d4a8b716a5265cc1a393e10 (diff) | |
download | op-kernel-dev-64a028a6de08545a2c94f302bc7694bf48aee5b5.zip op-kernel-dev-64a028a6de08545a2c94f302bc7694bf48aee5b5.tar.gz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
Fix failure exit in ipathfs
fix oops in fs/9p late mount failure
fix leak in romfs_fill_super()
get rid of pointless checks after simple_pin_fs()
Fix failure exits in bfs_fill_super()
fix affs parse_options()
Fix remount races with symlink handling in affs
Fix a leak in affs_fill_super()
Diffstat (limited to 'fs/affs/symlink.c')
-rw-r--r-- | fs/affs/symlink.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/affs/symlink.c b/fs/affs/symlink.c index 4178253..ee00f08 100644 --- a/fs/affs/symlink.c +++ b/fs/affs/symlink.c @@ -20,7 +20,6 @@ static int affs_symlink_readpage(struct file *file, struct page *page) int i, j; char c; char lc; - char *pf; pr_debug("AFFS: follow_link(ino=%lu)\n",inode->i_ino); @@ -32,11 +31,15 @@ static int affs_symlink_readpage(struct file *file, struct page *page) j = 0; lf = (struct slink_front *)bh->b_data; lc = 0; - pf = AFFS_SB(inode->i_sb)->s_prefix ? AFFS_SB(inode->i_sb)->s_prefix : "/"; if (strchr(lf->symname,':')) { /* Handle assign or volume name */ + struct affs_sb_info *sbi = AFFS_SB(inode->i_sb); + char *pf; + spin_lock(&sbi->symlink_lock); + pf = sbi->s_prefix ? sbi->s_prefix : "/"; while (i < 1023 && (c = pf[i])) link[i++] = c; + spin_unlock(&sbi->symlink_lock); while (i < 1023 && lf->symname[j] != ':') link[i++] = lf->symname[j++]; if (i < 1023) |