• M
    statfs() gives ESTALE error · fbf3fdd2
    Menyhart Zoltan 提交于
    Hi,
    
    An NFS client executes a statfs("file", &buff) call.
    "file" exists / existed, the client has read / written it,
    but it has already closed it.
    
    user_path(pathname, &path) looks up "file" successfully in the
    directory-cache  and restarts the aging timer of the directory-entry.
    Even if "file" has already been removed from the server, because the
    lookupcache=positive option I use, keeps the entries valid for a while.
    
    nfs_statfs() returns ESTALE if "file" has already been removed from the
    server.
    
    If the user application repeats the statfs("file", &buff) call, we
    are stuck: "file" remains young forever in the directory-cache.
    Signed-off-by: NZoltan Menyhart  <Zoltan.Menyhart@bull.net>
    Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
    Cc: stable@kernel.org
    fbf3fdd2
super.c 77.0 KB