Message ID | 20170201114914.20808-11-jlayton@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index cb94ec7961d2..da6e222dff84 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1288,8 +1288,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(-)