Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80d025ff authored by Jeff Layton's avatar Jeff Layton Committed by Ilya Dryomov
Browse files

ceph: don't update_dentry_lease unless we actually got one



This if block updates the dentry lease even in the case where
the MDS didn't grant one.

Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Reviewed-by: default avatarYan, Zheng <zyan@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 3dd69aab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1286,8 +1286,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,