diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-24 00:12:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-24 00:12:35 +0000 |
commit | 482368b1a8e45430672c58c9a42e7d2004367126 (patch) | |
tree | ce2a1a567d4d62dee7c2e71a46a99cf72cf1d606 /fs/locks.c | |
parent | e4d0251c6f56ab2e191afb70f80f382793e23f74 (diff) |
Merge with 2.3.47. Guys, this is buggy as shit. You've been warned.
Diffstat (limited to 'fs/locks.c')
-rw-r--r-- | fs/locks.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/locks.c b/fs/locks.c index 802958a68..1661a4a5c 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -416,15 +416,16 @@ int fcntl_setlk(unsigned int fd, unsigned int cmd, struct flock *l) if (IS_MANDLOCK(inode) && (inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID) { struct vm_area_struct *vma; - spin_lock(&inode->i_shared_lock); - for(vma = inode->i_mmap;vma;vma = vma->vm_next_share) { + struct address_space *mapping = inode->i_mapping; + spin_lock(&mapping->i_shared_lock); + for(vma = mapping->i_mmap;vma;vma = vma->vm_next_share) { if (!(vma->vm_flags & VM_MAYSHARE)) continue; - spin_unlock(&inode->i_shared_lock); + spin_unlock(&mapping->i_shared_lock); error = -EAGAIN; goto out_putf; } - spin_unlock(&inode->i_shared_lock); + spin_unlock(&mapping->i_shared_lock); } error = -EINVAL; |