• Marc Eshel's avatar
    lockd: add code to handle deferred lock requests · 1a8322b2
    Marc Eshel authored
    Rewrite nlmsvc_lock() to use the asynchronous interface.
    
    As with testlock, we answer nlm requests in nlmsvc_lock by first looking up
    the block and then using the results we find in the block if B_QUEUED is
    set, and calling vfs_lock_file() otherwise.
    
    If this a new lock request and we get -EINPROGRESS return on a non-blocking
    request then we defer the request.
    
    Also modify nlmsvc_unlock() to call the filesystem method if appropriate.
    Signed-off-by: default avatarMarc Eshel <eshel@almaden.ibm.com>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
    1a8322b2
svcsubs.c 8.4 KB