Commit 04d000eb358919043da538f197d63f2a5924a525
1 parent
0ceed5db32
Exists in
master
and in
7 other branches
ceph: fix open file counting on snapped inodes when mds returns no caps
It's possible the MDS will not issue caps on a snapped inode, in which case an open request may not __ceph_get_fmode(), botching the open file counting. (This is actually a server bug, but the client shouldn't BUG out in this case.) Signed-off-by: Sage Weil <sage@newdream.net>
Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff
fs/ceph/inode.c
... | ... | @@ -733,6 +733,10 @@ |
733 | 733 | __ceph_get_fmode(ci, cap_fmode); |
734 | 734 | spin_unlock(&inode->i_lock); |
735 | 735 | } |
736 | + } else if (cap_fmode >= 0) { | |
737 | + pr_warning("mds issued no caps on %llx.%llx\n", | |
738 | + ceph_vinop(inode)); | |
739 | + __ceph_get_fmode(ci, cap_fmode); | |
736 | 740 | } |
737 | 741 | |
738 | 742 | /* update delegation info? */ |