• NeilBrown's avatar
    NFS: check for nfs_refresh_inode() errors in nfs_fhget() · 26fde4df
    NeilBrown authored
    If an NFS server returns a filehandle that we have previously
    seen, and reports a different type, then nfs_refresh_inode()
    will log a warning and return an error.
    
    nfs_fhget() does not check for this error and may return an
    inode with a different type than the one that the server
    reported.
    
    This is likely to cause confusion, and is one way that
    ->open_context() could return a directory inode as discussed
    in the previous patch.
    
    So if nfs_refresh_inode() returns and error, return that error
    from nfs_fhget() to avoid the confusion propagating.
    Signed-off-by: default avatarNeilBrown <neilb@suse.com>
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    26fde4df
inode.c 58.6 KB