client: don't call flush_snaps when nothing to flush

Otherwise we fail an assert.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This commit is contained in:
Sage Weil 2011-07-05 13:40:24 -07:00
parent 933e34951b
commit e9e3883d0d

View File

@ -2815,7 +2815,8 @@ void Client::handle_cap_import(Inode *in, MClientCaps *m)
CEPH_CAP_FLAG_AUTH);
// reflush any/all caps
flush_snaps(in, true);
if (in->cap_snaps.size())
flush_snaps(in, true);
if (in->flushing_caps)
flush_caps(in, mds);