lkml.org 
[lkml]   [2008]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 1/9] lockd: dont return EAGAIN from blocking lock request
    From: Miklos Szeredi <mszeredi@suse.cz>

    EAGAIN does not make sense as a return value from a blocking lock
    request, the lock should be retried by the kernel until either it is
    successful or fails permanently.

    Looking at the server side NLM_LCK_DENIED means a permanent error in
    this case, so just turn this into an ENOLCK.

    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
    CC: Trond Myklebust <trond.myklebust@fys.uio.no>
    CC: "J. Bruce Fields" <bfields@fieldses.org>
    ---
    fs/lockd/clntproc.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    Index: linux-2.6/fs/lockd/clntproc.c
    ===================================================================
    --- linux-2.6.orig/fs/lockd/clntproc.c 2008-05-09 14:04:16.000000000 +0200
    +++ linux-2.6/fs/lockd/clntproc.c 2008-05-09 14:04:46.000000000 +0200
    @@ -808,7 +808,7 @@ nlm_stat_to_errno(__be32 status)
    case NLM_LCK_GRANTED:
    return 0;
    case NLM_LCK_DENIED:
    - return -EAGAIN;
    + return -ENOLCK;
    case NLM_LCK_DENIED_NOLOCKS:
    case NLM_LCK_DENIED_GRACE_PERIOD:
    return -ENOLCK;
    --


    \
     
     \ /
      Last update: 2008-05-09 14:45    [W:3.566 / U:0.156 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site