[sheepdog] [PATCH] sheep/gateway.c: remove duplicate `if` statement
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Wed Dec 17 09:24:14 CET 2014
At Wed, 17 Dec 2014 16:08:47 +0800,
徐小龙 wrote:
>
> [1 <multipart/alternative (7bit)>]
> [1.1 <text/plain; UTF-8 (7bit)>]
> current gateway.c has duplicate `if` statement,
> this patch remove it
>
> Signed-off-by: Xiaolong Xu <nxtxiaolong at gmail.com>
> ---
> sheep/gateway.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Thanks for your patch, Xiaolong. The content seems good, but the patch
is malformed. I guest you didn't use git send-email. Could you prepare
and post again based on this guideline:
https://github.com/sheepdog/sheepdog/wiki/Submit-a-patch?
Thanks,
Hitoshi
>
> diff --git a/sheep/gateway.c b/sheep/gateway.c
> index 7f7d1d1..91bcad2 100644
> --- a/sheep/gateway.c
> +++ b/sheep/gateway.c
> @@ -681,12 +681,11 @@ 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
>
>
> Thanks
> Long
> [1.2 <text/html; UTF-8 (quoted-printable)>]
>
> [2 <text/plain; us-ascii (7bit)>]
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog
More information about the sheepdog
mailing list