[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171117162616.Horde.VzOsCimCLXyyQJfEt3LNf9n@gator4166.hostgator.com>
Date: Fri, 17 Nov 2017 16:26:16 -0600
From: "Gustavo A. R. Silva" <garsilva@...eddedor.com>
To: David Howells <dhowells@...hat.com>
Cc: linux-afs@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: Logically dead code at fs/afs/cell.c:206
Quoting David Howells <dhowells@...hat.com>:
> Gustavo A. R. Silva <garsilva@...eddedor.com> wrote:
>
>> Today Coverity reported a "Logically dead code" issue at fs/afs/cell.c:206:
>>
>> if (!excl) {
>> rcu_read_lock();
>> cell = afs_lookup_cell_rcu(net, name, namesz);
>> rcu_read_unlock();
>> if (!IS_ERR(cell)) {
>> if (excl) {
>> afs_put_cell(net, cell);
>> return ERR_PTR(-EEXIST);
>> }
>> goto wait_for_cell;
>> }
>> }
>>
>> The problem is that when this code block is executed, the code block
>> starting at line 211 makes no sense, as _excl_ can never be true.
>
> Good catch. The interior "if (excl) { ... }" statement and body needs
> removing entirely. Originally the outer "if (!excl)" wrapping it wasn't
> there.
>
I'll send a patch to remove that code.
Thanks for clarifying.
--
Gustavo A. R. Silva
Powered by blists - more mailing lists