LKML Archive on
 help / color / Atom feed
From: David Howells <>
To: "Gustavo A. R. Silva" <>
Subject: Re: Logically dead code at fs/afs/cell.c:206
Date: Fri, 17 Nov 2017 22:21:47 +0000
Message-ID: <> (raw)
In-Reply-To: <>

Gustavo A. R. Silva <> 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


  reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-17 21:57 Gustavo A. R. Silva
2017-11-17 22:21 ` David Howells [this message]
2017-11-17 22:26   ` Gustavo A. R. Silva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git
	git clone --mirror lkml/git/10.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone