ceph: update the dlease for the hashed dentry when removing
The MDS will always refresh the dentry lease when removing the files or directories. And if the dentry is still hashed, we can update the dentry lease and no need to do the lookup from the MDS later. Signed-off-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
+3
-1
@@ -1466,10 +1466,12 @@ retry_lookup:
|
||||
} else if (have_lease) {
|
||||
if (d_unhashed(dn))
|
||||
d_add(dn, NULL);
|
||||
}
|
||||
|
||||
if (!d_unhashed(dn) && have_lease)
|
||||
update_dentry_lease(dir, dn,
|
||||
rinfo->dlease, session,
|
||||
req->r_request_started);
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user