• Steve Dickson's avatar
    NFSD: Don't give out read delegations on creates · 9a0590ae
    Steve Dickson authored
    When an exclusive create is done with the mode bits
    set (aka open(testfile, O_CREAT | O_EXCL, 0777)) this
    causes a OPEN op followed by a SETATTR op. When a
    read delegation is given in the OPEN, it causes
    the SETATTR to delay with EAGAIN until the
    delegation is recalled.
    
    This patch caused exclusive creates to give out
    a write delegation (which turn into no delegation)
    which allows the SETATTR seamlessly succeed.
    Signed-off-by: default avatarSteve Dickson <steved@redhat.com>
    [bfields: do this for any CREATE, not just exclusive; comment]
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    9a0590ae
nfs4state.c 137 KB