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
Kconfig -rw-r--r-- 592 bytes
Makefile -rw-r--r-- 743 bytes
acl.c -rw-r--r-- 7.3 KB
async-thread.c -rw-r--r-- 11.0 KB
async-thread.h -rw-r--r-- 3.2 KB
btrfs_inode.h -rw-r--r-- 3.4 KB
compat.h -rw-r--r-- 162 bytes
compression.c -rw-r--r-- 18.0 KB
compression.h -rw-r--r-- 1.7 KB
crc32c.h -rw-r--r-- 977 bytes
ctree.c -rw-r--r-- 101.6 KB
ctree.h -rw-r--r-- 68.4 KB
dir-item.c -rw-r--r-- 11.3 KB
disk-io.c -rw-r--r-- 61.6 KB
disk-io.h -rw-r--r-- 4.3 KB
export.c -rw-r--r-- 5.3 KB
export.h -rw-r--r-- 301 bytes
extent-tree.c -rw-r--r-- 154.9 KB
extent_io.c -rw-r--r-- 90.7 KB
extent_io.h -rw-r--r-- 10.1 KB
extent_map.c -rw-r--r-- 8.8 KB
extent_map.h -rw-r--r-- 1.6 KB
file-item.c -rw-r--r-- 21.8 KB
file.c -rw-r--r-- 34.6 KB
free-space-cache.c -rw-r--r-- 12.2 KB
hash.h -rw-r--r-- 878 bytes
inode-item.c -rw-r--r-- 5.7 KB
inode-map.c -rw-r--r-- 3.5 KB
inode.c -rw-r--r-- 133.9 KB
ioctl.c -rw-r--r-- 27.4 KB
ioctl.h -rw-r--r-- 2.2 KB
locking.c -rw-r--r-- 2.3 KB
locking.h -rw-r--r-- 1.0 KB
ordered-data.c -rw-r--r-- 19.4 KB
ordered-data.h -rw-r--r-- 4.8 KB
orphan.c -rw-r--r-- 1.7 KB
print-tree.c -rw-r--r-- 7.2 KB
print-tree.h -rw-r--r-- 906 bytes
ref-cache.c -rw-r--r-- 5.4 KB
ref-cache.h -rw-r--r-- 2.2 KB
root-tree.c -rw-r--r-- 8.9 KB
struct-funcs.c -rw-r--r-- 4.9 KB
super.c -rw-r--r-- 16.5 KB
sysfs.c -rw-r--r-- 6.8 KB
transaction.c -rw-r--r-- 29.7 KB
transaction.h -rw-r--r-- 3.3 KB
tree-defrag.c -rw-r--r-- 3.6 KB
tree-log.c -rw-r--r-- 76.4 KB
tree-log.h -rw-r--r-- 1.6 KB
version.h -rw-r--r-- 95 bytes
version.sh -rw-r--r-- 1000 bytes
volumes.c -rw-r--r-- 80.2 KB
volumes.h -rw-r--r-- 4.8 KB
xattr.c -rw-r--r-- 8.1 KB
xattr.h -rw-r--r-- 1.4 KB
zlib.c -rw-r--r-- 16.2 KB

back to top