summaryrefslogtreecommitdiffstats
path: root/fs/ceph/inode.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2019-01-28 13:43:55 +0100
committerIlya Dryomov <idryomov@gmail.com>2019-03-05 18:55:17 +0100
commit1e9c2eb6811e8e017b589b483f6ff2b7c065eef5 (patch)
treeda13ff7c0874e6872cfda880dcb48b42e1233120 /fs/ceph/inode.c
parentceph: remove dentry_lru file from debugfs (diff)
downloadlinux-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.c2
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;