summaryrefslogtreecommitdiffstats
path: root/fs/ceph/caps.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r--fs/ceph/caps.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index dfb509f5354..93c1afe3f0b 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -697,10 +697,15 @@ static void __touch_cap(struct ceph_cap *cap)
{
struct ceph_mds_session *s = cap->session;
- dout("__touch_cap %p cap %p mds%d\n", &cap->ci->vfs_inode, cap,
- s->s_mds);
spin_lock(&s->s_cap_lock);
- list_move_tail(&cap->session_caps, &s->s_caps);
+ if (!s->s_iterating_caps) {
+ dout("__touch_cap %p cap %p mds%d\n", &cap->ci->vfs_inode, cap,
+ s->s_mds);
+ list_move_tail(&cap->session_caps, &s->s_caps);
+ } else {
+ dout("__touch_cap %p cap %p mds%d NOP, iterating over caps\n",
+ &cap->ci->vfs_inode, cap, s->s_mds);
+ }
spin_unlock(&s->s_cap_lock);
}