• Trond Myklebust's avatar
    NFS: Fix NFSv4 open stateid regressions · 45328c35
    Trond Myklebust authored
    Do not allow cached open for O_RDONLY or O_WRONLY unless the file has been
    previously opened in these modes.
    
    Also Fix the calculation of the mode in nfs4_close_prepare. We should only
    issue an OPEN_DOWNGRADE if we're sure that we will still be holding the
    correct open modes. This may not be the case if we've been doing delegated
    opens.
    
    Finally, there is no need to adjust the open mode bit flags in
    nfs4_close_done(): that has already been done in nfs4_close_prepare().
    Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
    45328c35
nfs4proc.c 100 KB