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-- 1.7 KB
Makefile -rw-r--r-- 388 bytes
acl.c -rw-r--r-- 11.5 KB
acl.h -rw-r--r-- 1.6 KB
balloc.c -rw-r--r-- 44.6 KB
dir.c -rw-r--r-- 17.6 KB
ext2.h -rw-r--r-- 6.4 KB
file.c -rw-r--r-- 2.3 KB
fsync.c -rw-r--r-- 1.3 KB
ialloc.c -rw-r--r-- 18.4 KB
inode.c -rw-r--r-- 42.0 KB
ioctl.c -rw-r--r-- 4.3 KB
namei.c -rw-r--r-- 9.2 KB
super.c -rw-r--r-- 39.4 KB
symlink.c -rw-r--r-- 1.3 KB
xattr.c -rw-r--r-- 28.0 KB
xattr.h -rw-r--r-- 3.3 KB
xattr_security.c -rw-r--r-- 1.7 KB
xattr_trusted.c -rw-r--r-- 1.5 KB
xattr_user.c -rw-r--r-- 1.5 KB
xip.c -rw-r--r-- 2.0 KB
xip.h -rw-r--r-- 759 bytes

back to top