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
Makefile -rw-r--r-- 69 bytes
file.c -rw-r--r-- 16.3 KB
inode.c -rw-r--r-- 14.7 KB

back to top