diff options
author | Yan, Zheng <zyan@redhat.com> | 2019-01-28 13:43:55 +0100 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2019-03-05 18:55:17 +0100 |
commit | 1e9c2eb6811e8e017b589b483f6ff2b7c065eef5 (patch) | |
tree | da13ff7c0874e6872cfda880dcb48b42e1233120 /fs/ceph/inode.c | |
parent | ceph: remove dentry_lru file from debugfs (diff) | |
download | linux-1e9c2eb6811e8e017b589b483f6ff2b7c065eef5.tar.xz linux-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/inode.c')
-rw-r--r-- | fs/ceph/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index f588b2d7b598..f75476e94d75 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -497,7 +497,7 @@ struct inode *ceph_alloc_inode(struct super_block *sb) ci->i_wrbuffer_ref = 0; ci->i_wrbuffer_ref_head = 0; atomic_set(&ci->i_filelock_ref, 0); - atomic_set(&ci->i_shared_gen, 0); + atomic_set(&ci->i_shared_gen, 1); ci->i_rdcache_gen = 0; ci->i_rdcache_revoking = 0; |