lkml.org 
[lkml]   [2017]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Logically dead code at fs/afs/cell.c:206
Date
Gustavo A. R. Silva <garsilva@embeddedor.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.

David

\
 
 \ /
  Last update: 2017-11-17 23:22    [W:0.047 / U:6.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site