diff options
author | Jeff Layton <jlayton@redhat.com> | 2017-01-26 16:14:18 -0500 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-02-20 12:16:09 +0100 |
commit | 80d025ffede88969f6adf7266fbdedfd5641148a (patch) | |
tree | 919744de22564e8f2f5e477d93700ada34d57cb1 /fs/ceph | |
parent | 3dd69aabcef3d835446a9a1e11d2eab0e6e35e95 (diff) | |
download | linux-80d025ffede88969f6adf7266fbdedfd5641148a.tar.bz2 |
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: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Yan, Zheng <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 35a8c453bea6..542e3c6b0f1b 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1286,8 +1286,8 @@ retry_lookup: 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, |