mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02:00
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:
parent
546a5d6122
commit
7ffe4fcea7
|
|
@ -1466,10 +1466,12 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req)
|
|||
} 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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user