diff options
author | Arve Hjønnevåg <arve@android.com> | 2010-03-10 16:38:33 -0800 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2010-03-10 16:38:33 -0800 |
commit | 67078ecae3edb5b4657dcb9f67f744ecccd18a97 (patch) | |
tree | 90333318a7229fd977881577e0d19fd8e7e26423 /fs/affs/namei.c | |
parent | dc136618cb23810dd3d4adfcb836b289cd528b4f (diff) | |
parent | 7f5e918e62cbc9ac27c2f47d3c3dd4b86f67ff0e (diff) |
Merge commit 'v2.6.32.9' into android-2.6.32
Diffstat (limited to 'fs/affs/namei.c')
-rw-r--r-- | fs/affs/namei.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/affs/namei.c b/fs/affs/namei.c index 960d336ec694..d70bbbac6b7b 100644 --- a/fs/affs/namei.c +++ b/fs/affs/namei.c @@ -341,10 +341,13 @@ affs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) p = (char *)AFFS_HEAD(bh)->table; lc = '/'; if (*symname == '/') { + struct affs_sb_info *sbi = AFFS_SB(sb); while (*symname == '/') symname++; - while (AFFS_SB(sb)->s_volume[i]) /* Cannot overflow */ - *p++ = AFFS_SB(sb)->s_volume[i++]; + spin_lock(&sbi->symlink_lock); + while (sbi->s_volume[i]) /* Cannot overflow */ + *p++ = sbi->s_volume[i++]; + spin_unlock(&sbi->symlink_lock); } while (i < maxlen && (c = *symname++)) { if (c == '.' && lc == '/' && *symname == '.' && symname[1] == '/') { |