https://github.com/torvalds/linux
Revision fa82a491275a613b15489aab4b99acecb00958d3 authored by Jeff Layton on 22 January 2009, 19:16:04 UTC, committed by J. Bruce Fields on 27 January 2009, 22:26:59 UTC
nfsd4_lockt does a search for a lockstateowner when building the lock
struct to test. If one is found, it'll set fl_owner to it. Regardless of
whether that happens, it'll also set fl_lmops. Given that this lock is
basically a "lightweight" lock that's just used for checking conflicts,
setting fl_lmops is probably not appropriate for it.

This behavior exposed a bug in DLM's GETLK implementation where it
wasn't clearing out the fields in the file_lock before filling in
conflicting lock info. While we were able to fix this in DLM, it
still seems pointless and dangerous to set the fl_lmops this way
when we may have a NULL lockstateowner.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@pig.fieldses.org>
1 parent b914152
History
Tip revision: fa82a491275a613b15489aab4b99acecb00958d3 authored by Jeff Layton on 22 January 2009, 19:16:04 UTC
nfsd: only set file_lock.fl_lmops in nfsd4_lockt if a stateowner is found
Tip revision: fa82a49
File Mode Size
9p
adfs
affs
afs
autofs
autofs4
befs
bfs
btrfs
cifs
coda
configfs
cramfs
debugfs
devpts
dlm
ecryptfs
efs
exportfs
ext2
ext3
ext4
fat
freevxfs
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs
isofs
jbd
jbd2
jffs2
jfs
lockd
minix
ncpfs
nfs
nfs_common
nfsd
nls
notify
ntfs
ocfs2
omfs
openpromfs
partitions
proc
qnx4
ramfs
reiserfs
romfs
smbfs
squashfs
sysfs
sysv
ubifs
udf
ufs
xfs
Kconfig -rw-r--r-- 6.7 KB
Kconfig.binfmt -rw-r--r-- 6.4 KB
Makefile -rw-r--r-- 3.9 KB
aio.c -rw-r--r-- 46.1 KB
anon_inodes.c -rw-r--r-- 5.0 KB
attr.c -rw-r--r-- 4.8 KB
bad_inode.c -rw-r--r-- 7.9 KB
binfmt_aout.c -rw-r--r-- 12.8 KB
binfmt_elf.c -rw-r--r-- 54.1 KB
binfmt_elf_fdpic.c -rw-r--r-- 47.5 KB
binfmt_em86.c -rw-r--r-- 2.8 KB
binfmt_flat.c -rw-r--r-- 26.2 KB
binfmt_misc.c -rw-r--r-- 15.1 KB
binfmt_script.c -rw-r--r-- 2.8 KB
binfmt_som.c -rw-r--r-- 7.5 KB
bio-integrity.c -rw-r--r-- 19.9 KB
bio.c -rw-r--r-- 38.3 KB
block_dev.c -rw-r--r-- 33.0 KB
buffer.c -rw-r--r-- 89.5 KB
char_dev.c -rw-r--r-- 13.2 KB
compat.c -rw-r--r-- 53.4 KB
compat_binfmt_elf.c -rw-r--r-- 3.4 KB
compat_ioctl.c -rw-r--r-- 81.0 KB
dcache.c -rw-r--r-- 59.9 KB
dcookies.c -rw-r--r-- 6.8 KB
direct-io.c -rw-r--r-- 34.4 KB
dquot.c -rw-r--r-- 67.5 KB
drop_caches.c -rw-r--r-- 1.6 KB
eventfd.c -rw-r--r-- 5.3 KB
eventpoll.c -rw-r--r-- 37.5 KB
exec.c -rw-r--r-- 42.5 KB
fcntl.c -rw-r--r-- 13.7 KB
fifo.c -rw-r--r-- 3.2 KB
file.c -rw-r--r-- 12.1 KB
file_table.c -rw-r--r-- 10.2 KB
filesystems.c -rw-r--r-- 6.3 KB
fs-writeback.c -rw-r--r-- 22.9 KB
generic_acl.c -rw-r--r-- 4.2 KB
inode.c -rw-r--r-- 40.2 KB
internal.h -rw-r--r-- 1.5 KB
ioctl.c -rw-r--r-- 13.9 KB
ioprio.c -rw-r--r-- 5.2 KB
libfs.c -rw-r--r-- 20.5 KB
locks.c -rw-r--r-- 57.6 KB
mbcache.c -rw-r--r-- 18.3 KB
mpage.c -rw-r--r-- 19.9 KB
namei.c -rw-r--r-- 70.0 KB
namespace.c -rw-r--r-- 58.0 KB
nfsctl.c -rw-r--r-- 2.5 KB
no-block.c -rw-r--r-- 663 bytes
open.c -rw-r--r-- 26.9 KB
pipe.c -rw-r--r-- 24.1 KB
pnode.c -rw-r--r-- 8.9 KB
pnode.h -rw-r--r-- 1.1 KB
posix_acl.c -rw-r--r-- 8.4 KB
quota.c -rw-r--r-- 12.3 KB
quota_tree.c -rw-r--r-- 16.6 KB
quota_tree.h -rw-r--r-- 689 bytes
quota_v1.c -rw-r--r-- 6.1 KB
quota_v2.c -rw-r--r-- 7.0 KB
quotaio_v1.h -rw-r--r-- 1.2 KB
quotaio_v2.h -rw-r--r-- 1.9 KB
read_write.c -rw-r--r-- 18.8 KB
read_write.h -rw-r--r-- 542 bytes
readdir.c -rw-r--r-- 6.9 KB
select.c -rw-r--r-- 23.0 KB
seq_file.c -rw-r--r-- 13.6 KB
signalfd.c -rw-r--r-- 7.1 KB
splice.c -rw-r--r-- 38.9 KB
stack.c -rw-r--r-- 1.1 KB
stat.c -rw-r--r-- 10.6 KB
super.c -rw-r--r-- 23.2 KB
sync.c -rw-r--r-- 8.4 KB
timerfd.c -rw-r--r-- 6.8 KB
utimes.c -rw-r--r-- 5.6 KB
xattr.c -rw-r--r-- 14.9 KB
xattr_acl.c -rw-r--r-- 2.3 KB

back to top