virtiofsd: Disable posix_lock hash table if remote locks are not enabled
authorVivek Goyal <vgoyal@redhat.com>
Mon, 7 Dec 2020 18:30:20 +0000 (13:30 -0500)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Fri, 18 Dec 2020 10:08:24 +0000 (10:08 +0000)
commite7e8aa8aead2874f789a5d4a84cddb9b099fbd1c
treed19dba1a2e8311800271e87ac37c5e77fa3ebcff
parentad3bfe1bd6d07b086738f0e537a8f3c9b1ab65a6
virtiofsd: Disable posix_lock hash table if remote locks are not enabled

If remote posix locks are not enabled (lo->posix_lock == false), then disable
code paths taken to initialize inode->posix_lock hash table and corresponding
destruction and search etc.

lo_getlk() and lo_setlk() have been modified to return ENOSYS if daemon
does not support posix lock but client still sends a lock/unlock request.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Message-Id: <20201207183021.22752-3-vgoyal@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/passthrough_ll.c