aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/caps.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r--fs/ceph/caps.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 775e6f6fc970..d8132b6e770d 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -610,7 +610,6 @@ retry:
610 cap->issue_seq = seq; 610 cap->issue_seq = seq;
611 cap->mseq = mseq; 611 cap->mseq = mseq;
612 cap->cap_gen = session->s_cap_gen; 612 cap->cap_gen = session->s_cap_gen;
613 cap->recon_gen = session->s_recon_gen;
614 613
615 if (fmode >= 0) 614 if (fmode >= 0)
616 __ceph_get_fmode(ci, fmode); 615 __ceph_get_fmode(ci, fmode);
@@ -627,21 +626,13 @@ retry:
627static int __cap_is_valid(struct ceph_cap *cap) 626static int __cap_is_valid(struct ceph_cap *cap)
628{ 627{
629 unsigned long ttl; 628 unsigned long ttl;
630 u32 gen, recon_gen; 629 u32 gen;
631 630
632 spin_lock(&cap->session->s_cap_lock); 631 spin_lock(&cap->session->s_cap_lock);
633 gen = cap->session->s_cap_gen; 632 gen = cap->session->s_cap_gen;
634 recon_gen = cap->session->s_recon_gen;
635 ttl = cap->session->s_cap_ttl; 633 ttl = cap->session->s_cap_ttl;
636 spin_unlock(&cap->session->s_cap_lock); 634 spin_unlock(&cap->session->s_cap_lock);
637 635
638 if (cap->recon_gen != recon_gen) {
639 dout("__cap_is_valid %p cap %p issued %s "
640 "but DEAD (recon_gen %u vs %u)\n", &cap->ci->vfs_inode,
641 cap, ceph_cap_string(cap->issued), cap->recon_gen,
642 recon_gen);
643 return 0;
644 }
645 if (cap->cap_gen < gen || time_after_eq(jiffies, ttl)) { 636 if (cap->cap_gen < gen || time_after_eq(jiffies, ttl)) {
646 dout("__cap_is_valid %p cap %p issued %s " 637 dout("__cap_is_valid %p cap %p issued %s "
647 "but STALE (gen %u vs %u)\n", &cap->ci->vfs_inode, 638 "but STALE (gen %u vs %u)\n", &cap->ci->vfs_inode,
@@ -2213,7 +2204,6 @@ restart:
2213 issued |= implemented | __ceph_caps_dirty(ci); 2204 issued |= implemented | __ceph_caps_dirty(ci);
2214 2205
2215 cap->cap_gen = session->s_cap_gen; 2206 cap->cap_gen = session->s_cap_gen;
2216 cap->recon_gen = session->s_recon_gen;
2217 2207
2218 __check_cap_issue(ci, cap, newcaps); 2208 __check_cap_issue(ci, cap, newcaps);
2219 2209