Message ID | 20170203180404.31930-6-jlayton@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index b4b61da03dbf..e5c1ca02dbe3 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1289,8 +1289,8 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req) ceph_dir_clear_ordered(dir); dout("d_delete %p\n", dn); d_delete(dn); - } else { - if (have_lease && d_unhashed(dn)) + } else if (have_lease) { + if (d_unhashed(dn)) d_add(dn, NULL); update_dentry_lease(dn, rinfo->dlease, session,
This if block updates the dentry lease even in the case where the MDS didn't grant one. Signed-off-by: Jeff Layton <jlayton@redhat.com> --- fs/ceph/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)