diff options
author | Yan, Zheng <zyan@redhat.com> | 2015-05-06 22:59:47 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-06-25 04:49:28 -0400 |
commit | 622f3e250f498976ad4cbae6f2be5cb359ded4f5 (patch) | |
tree | 57bcc161bb3c3bd0c3a71d7cb5b2ee69f4340869 /fs/ceph/mds_client.c | |
parent | 604d1b0245b97738cde4341944ad93edff4b2827 (diff) |
ceph: don't trim auth cap when there are cap snaps
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r-- | fs/ceph/mds_client.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index f125e06dacb8..88010f9a254d 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -1371,7 +1371,8 @@ static int trim_caps_cb(struct inode *inode, struct ceph_cap *cap, void *arg) | |||
1371 | inode, cap, ceph_cap_string(mine), ceph_cap_string(oissued), | 1371 | inode, cap, ceph_cap_string(mine), ceph_cap_string(oissued), |
1372 | ceph_cap_string(used), ceph_cap_string(wanted)); | 1372 | ceph_cap_string(used), ceph_cap_string(wanted)); |
1373 | if (cap == ci->i_auth_cap) { | 1373 | if (cap == ci->i_auth_cap) { |
1374 | if (ci->i_dirty_caps | ci->i_flushing_caps) | 1374 | if (ci->i_dirty_caps || ci->i_flushing_caps || |
1375 | !list_empty(&ci->i_cap_snaps)) | ||
1375 | goto out; | 1376 | goto out; |
1376 | if ((used | wanted) & CEPH_CAP_ANY_WR) | 1377 | if ((used | wanted) & CEPH_CAP_ANY_WR) |
1377 | goto out; | 1378 | goto out; |