• Jeff Layton's avatar
    ceph: allow dentry_lease_is_valid to work under RCU walk · 14fb9c9e
    Jeff Layton authored
    Under rcuwalk, we need to take extra care when dereferencing d_parent.
    We want to do that once and pass a pointer to dentry_lease_is_valid.
    
    Also, we must ensure that that function can handle the case where we're
    racing with d_release. Check whether "di" is NULL under the d_lock, and
    just return 0 if so.
    
    Finally, we still need to kick off a renewal job if the lease is getting
    close to expiration. If that's the case, then just drop out of rcuwalk
    mode since that could block.
    Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
    Reviewed-by: default avatarYan, Zheng <zyan@redhat.com>
    14fb9c9e
dir.c 39.8 KB