Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2308392imm; Tue, 4 Sep 2018 02:05:03 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaAsBMG9fTUaV+Pks4aajnu2h5b8QMdzBLFIYdA9N7j+qDdaNhM9w+0HPyHxno+MQkyNgv4 X-Received: by 2002:a62:4fd9:: with SMTP id f86-v6mr15561436pfj.110.1536051903408; Tue, 04 Sep 2018 02:05:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536051903; cv=none; d=google.com; s=arc-20160816; b=HEi2x1QIqUlSX8QiZAdK7H5MspBBQilKVCw4yz8zP9/1eDBswKv28v6qOwVVNUzW0v 6TzdM0yZBjbUezruDkPW8gM5UzI1mGy6NFto1IChxdeRAR1c5hiCxw6BIdib3Lf/v3u5 Y8G8StWjyK0rtLSMEcdctS1ABcrVhqdtVq/UR3P+roqhggrAoWM3UvAqaihQMqSNWnv4 LK/yLaXPr7sc3DR81MbE4qtSXabTgoGabtXOu15USfvVUDNu9v+ULtyOrmMqtm1tZx6T Rn3SLK5wsqUXJZtUon3qtKiCkN303Crq/lhnkEt7ovxQtcv9OxFTCh+q51I6kdmC8lca sr4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :arc-authentication-results; bh=aUvuS9Cmit5YzFHVT/0fgOiDg0nUUSv/BMjImGIa4O8=; b=KWNwTkp4iE3kXMIfeukHOguUMoKdcRTNpjuSJd6U4Z6I/W/A1y7qYbUEHs8cMm30xR E3P6JiegzDJ4BjWrU0e6QJO33dJaeC8+QQa7mx/oHXVhMw4dt6uRzkhob3TzrQE6MXAJ 75bNGXG0A80odCjssQFaKPm+CMYYZXbvbq6fl4+DPdiQz+Z8uxKBiEltjTdv3ZMgDVkj ne5AbifJohMJqYtKy/cqdjFO7ENGYqjRZNsij+IflPcH+jdN0k8tdInQcvxiaial9ngK CeybtqgaKNt5faOxbEEH+tLCGNHzCW3BQWkkQlBoWZ2Sky9CRAiYDR2Jz+MfNfHL4Pq2 7SjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g205-v6si23822775pfb.294.2018.09.04.02.04.47; Tue, 04 Sep 2018 02:05:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726292AbeIDN1c (ORCPT + 99 others); Tue, 4 Sep 2018 09:27:32 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41799 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726199AbeIDN1b (ORCPT ); Tue, 4 Sep 2018 09:27:31 -0400 Received: by mail-wr1-f68.google.com with SMTP id z96-v6so3086140wrb.8 for ; Tue, 04 Sep 2018 02:03:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=aUvuS9Cmit5YzFHVT/0fgOiDg0nUUSv/BMjImGIa4O8=; b=LLYQ/cOrzVQGOrL9kdKssyEKFP8nUqPYXelH+Fc9ZcvOy4qbqqkIpCI6shFbgUfUKz 30x+gBKzgFpBoFsm/I1y/jH8+ILlluH5ecE88GtIwhaxaef6grp7ThycwVBVzhoC8Yzc oq0nbfjiRPBRfsVha4MVfEKILOUQ9meKeVQO1iu98yzhsTdvsn8/irhWj1CaOob3P9Yp eapAauBg362w7id1sp1r/ATf1+MxUXskzw7ydKDFl9MPamtgK1ZINehm7HSr81UmGO+l wLoL6ZVjcAmZgxAUeOZwhAzXnWDVNF6tw2F8iUpEgzcmil9T4JQbei4xR+a3im207pgm yeGg== X-Gm-Message-State: APzg51AixCAj4EhDrYlt38SZ2evauwp/eLaZ61idEqeVjvnFhMja5X7G JutmtywR8fJf1nYC09uuClg= X-Received: by 2002:adf:a11c:: with SMTP id o28-v6mr22571259wro.169.1536051799129; Tue, 04 Sep 2018 02:03:19 -0700 (PDT) Received: from ?IPv6:2a01:4240:2e27:ad85:aaaa::70f? ([2a01:4240:2e27:ad85:aaaa::70f]) by smtp.gmail.com with ESMTPSA id k35-v6sm33144430wrc.14.2018.09.04.02.03.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Sep 2018 02:03:18 -0700 (PDT) Subject: Re: [PATCHv2 4/4] tty: Simplify tty->count math in tty_reopen() To: Dmitry Safonov , linux-kernel@vger.kernel.org Cc: Daniel Axtens , Dmitry Safonov <0x7f454c46@gmail.com>, Sergey Senozhatsky , Dmitry Vyukov , Nathan March , Tan Xiaojun , Peter Hurley , Tetsuo Handa , =?UTF-8?B?UGFzaSBLw6Rya2vDpGluZW4=?= , Greg Kroah-Hartman , Michael Neuling , Mikulas Patocka References: <20180903165257.29227-1-dima@arista.com> <20180903165257.29227-5-dima@arista.com> From: Jiri Slaby Openpgp: preference=signencrypt Autocrypt: addr=jslaby@suse.cz; prefer-encrypt=mutual; keydata= xsFNBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA0jyyJtYI86wdKraekbNE0bC4zV+ryvH4j rrcDwGs6tFVrAHvdHeIdI07s1iIx5R/ndcHwt4fvI8CL5PzPmn5J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AgO+DFpbyIa4RlnfpcW17AfnpZi9VR5+zr496n2jH /1ldwRO/S+QNSA8qdABqMb9WI4BNaoANgcg0AS429Mq0taaWKkAjkkGAT7mD1Q5PiLr06Y/+ Kzdr90eUVneqM2TUQQbK+Kh7JwmGVrRGNqQrDk+gRNvKnGwFNeTkTKtJ0P8jYd7P1gZb9Fwj 9YLxjhn/sVIhNmEBLBoI7PL+9fbILqJPHgAwW35rpnq4f/EYTykbk1sa13Tav6btJ+4QOgbc ezWIwZ5w/JVfEJW9JXp3BFAVzRQ5nVrrLDAJZ8Y5ioWcm99JtSIIxXxt9FJaGc1Bgsi5K/+d yTKLwLMJgiBzbVx8G+fCJJ9YtlNOPWhbKPlrQ8+AY52Aagi9WNhe6XfJdh5g6ptiOILm330m kR4gW6nEgZVyIyTq3ekOuruftWL99qpP5zi+eNrMmLRQx9iecDNgFr342R9bTDlb1TLuRb+/ tJ98f/bIWIr0cqQmqQ33FgRhrG1+Xml6UXyJ2jExmlO8JljuOGeXYh6ZkIEyzqzffzBLXZCu jlYQDFXpyMNVJ2ZwPmX2mWEoYuaBU0JN7wM+/zWgOf2zRwhEuD3A2cO2PxoiIfyUEfB9SSmf faK/S4xXoB6wvGENZ85Hg37C7WDNdaAt6Xh2uQIly5grkgvWppkNy4ZHxE+jeNsU7tg= Message-ID: <2010083d-6c2e-d363-635a-f61ebf7b034c@suse.cz> Date: Tue, 4 Sep 2018 11:03:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180903165257.29227-5-dima@arista.com> Content-Type: text/plain; charset=iso-8859-2 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/03/2018, 06:52 PM, Dmitry Safonov wrote: > As noted by Jiri, tty_ldisc_reinit() shouldn't rely on tty counter. > Simplify math by increasing the counter after reinit success. > > Cc: Greg Kroah-Hartman > Cc: Jiri Slaby Reviewed-by: Jiri Slaby > Link: lkml.kernel.org/r/<20180829022353.23568-2-dima@arista.com> > Suggested-by: Jiri Slaby > Signed-off-by: Dmitry Safonov thanks, -- js suse labs