1
0
Fork 0

ceph: don't trim auth cap when there are cap snaps

Signed-off-by: Yan, Zheng <zyan@redhat.com>
hifive-unleashed-5.1
Yan, Zheng 2015-05-07 10:59:47 +08:00 committed by Ilya Dryomov
parent 604d1b0245
commit 622f3e250f
1 changed files with 2 additions and 1 deletions

View File

@ -1371,7 +1371,8 @@ static int trim_caps_cb(struct inode *inode, struct ceph_cap *cap, void *arg)
inode, cap, ceph_cap_string(mine), ceph_cap_string(oissued),
ceph_cap_string(used), ceph_cap_string(wanted));
if (cap == ci->i_auth_cap) {
if (ci->i_dirty_caps | ci->i_flushing_caps)
if (ci->i_dirty_caps || ci->i_flushing_caps ||
!list_empty(&ci->i_cap_snaps))
goto out;
if ((used | wanted) & CEPH_CAP_ANY_WR)
goto out;