• J. Bruce Fields's avatar
    nfsd4: fix file leak on open_downgrade · f197c271
    J. Bruce Fields authored
    Stateid's hold a read reference for a read open, a write reference for a
    write open, and an additional one of each for each read+write open.  The
    latter wasn't getting put on a downgrade, so something like:
    
    	open RW
    	open R
    	downgrade to R
    
    was resulting in a file leak.
    
    Also fix an imbalance in an error path.
    
    Regression from 7d947842 "nfsd4: fix
    downgrade/lock logic".
    
    Cc: stable@kernel.org
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    f197c271
nfs4state.c 119 KB