From e9e3883d0db4cc03183c0432773825f84170c42b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 5 Jul 2011 13:40:24 -0700 Subject: [PATCH] client: don't call flush_snaps when nothing to flush Otherwise we fail an assert. Signed-off-by: Sage Weil --- src/client/Client.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index f9e75e13909bd..7b73073a1d577 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -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); -- 2.39.5