From: Xiaolong Xu <[email protected]> [Hitoshi: trivial cosmetic change]
Signed-off-by: Xiaolong Xu <[email protected]> Signed-off-by: Hitoshi Mitake <[email protected]> --- sheep/gateway.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sheep/gateway.c b/sheep/gateway.c index 7f7d1d1..6ff537c 100644 --- a/sheep/gateway.c +++ b/sheep/gateway.c @@ -681,12 +681,12 @@ int gateway_write_obj(struct request *req) if (!bypass_object_cache(req)) return object_cache_handle_request(req); - if (is_data_vid_update(hdr)) - invalidate_other_nodes(oid_to_vid(oid)); if (is_data_vid_update(hdr)) { size_t nr_vids = hdr->data_length / sizeof(*vids); + invalidate_other_nodes(oid_to_vid(oid)); + /* read the previous vids to discard their references later */ vids = xzalloc(sizeof(*vids) * nr_vids); refs = xzalloc(sizeof(*refs) * nr_vids); -- 1.9.1 -- sheepdog mailing list [email protected] https://lists.wpkg.org/mailman/listinfo/sheepdog
