• J
    nfsd4: preallocate nfs4_file in process_open1() · 32513b40
    J. Bruce Fields 提交于
    Creating a new file is an irrevocable step--once it's visible in the
    filesystem, other processes may have seen it and done something with it,
    and unlinking it wouldn't simply undo the effects of the create.
    
    Therefore, in the case where OPEN creates a new file, we shouldn't do
    the create until we know that the rest of the OPEN processing will
    succeed.
    
    For example, we should preallocate a struct file in case we need it
    until waiting to allocate it till process_open2(), which is already too
    late.
    Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
    32513b40
nfs4state.c 116.5 KB