patch-2.3.45 linux/fs/locks.c
Next file: linux/fs/ncpfs/inode.c
Previous file: linux/fs/inode.c
Back to the patch index
Back to the overall index
- Lines: 21
- Date:
Sun Feb 13 18:20:21 2000
- Orig file:
v2.3.44/linux/fs/locks.c
- Orig date:
Thu Aug 26 13:05:40 1999
diff -u --recursive --new-file v2.3.44/linux/fs/locks.c linux/fs/locks.c
@@ -416,15 +416,16 @@
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;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)