[sheepdog] [PATCH stable-0.9 4/4] sheep: remove the duplicate `if` statement
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Wed Dec 24 16:20:22 CET 2014
From: Xiaolong Xu <nxtxiaolong at gmail.com>
[Hitoshi: trivial cosmetic change]
Signed-off-by: Xiaolong Xu <nxtxiaolong at gmail.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
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
More information about the sheepdog
mailing list