diff options
author | Yan, Zheng <zyan@redhat.com> | 2019-01-28 20:43:55 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2019-03-05 18:55:17 +0100 |
commit | 1e9c2eb6811e8e017b589b483f6ff2b7c065eef5 (patch) | |
tree | da13ff7c0874e6872cfda880dcb48b42e1233120 /fs/ceph/mds_client.c | |
parent | 8d9c0906acef6c281ead4e353c93d54d08c994c8 (diff) | |
download | lwn-1e9c2eb6811e8e017b589b483f6ff2b7c065eef5.tar.gz lwn-1e9c2eb6811e8e017b589b483f6ff2b7c065eef5.zip |
ceph: delete stale dentry when last reference is dropped
introduce ceph_d_delete(), which checks if dentry has valid lease.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r-- | fs/ceph/mds_client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index c9d4561336fc..99d6e805668c 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -621,7 +621,7 @@ static struct ceph_mds_session *register_session(struct ceph_mds_client *mdsc, ceph_con_init(&s->s_con, s, &mds_con_ops, &mdsc->fsc->client->msgr); spin_lock_init(&s->s_gen_ttl_lock); - s->s_cap_gen = 0; + s->s_cap_gen = 1; s->s_cap_ttl = jiffies - 1; spin_lock_init(&s->s_cap_lock); |