All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Xiao Wang <xiao.w.wang@intel.com>
Cc: ferruh.yigit@intel.com, dev@dpdk.org
Subject: Re: [PATCH v2] igb_uio: allow multi-process access
Date: Tue, 19 Dec 2017 07:39:01 -0800	[thread overview]
Message-ID: <20171219073901.6d048a47@xeon-e3> (raw)
In-Reply-To: <1513698140-92837-1-git-send-email-xiao.w.wang@intel.com>

On Tue, 19 Dec 2017 07:42:20 -0800
Xiao Wang <xiao.w.wang@intel.com> wrote:

> +	atomic_dec(&udev->refcnt);
> +	if (atomic_read(&udev->refcnt) > 0)
> +		return 0;
> +

The point of using atomic functions is to do atomic operations.
You need to use atomic_dec_and_test here.

  parent reply	other threads:[~2017-12-19 15:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-09  1:57 [PATCH] igb_uio: allow multi-process access Xiao Wang
2017-12-12  1:38 ` Stephen Hemminger
2017-12-18 15:53   ` Wang, Xiao W
2017-12-19 15:42 ` [PATCH v2] " Xiao Wang
2017-12-19  9:04   ` Tiwei Bie
2017-12-19  9:23     ` Wang, Xiao W
2017-12-19 15:39   ` Stephen Hemminger [this message]
2017-12-19 17:58   ` [PATCH v3] " Xiao Wang
2017-12-20  2:17     ` Tiwei Bie
2018-01-01 22:00     ` [PATCH v4] " Xiao Wang
2018-01-16 19:43       ` Ferruh Yigit
2018-01-16 23:37         ` Thomas Monjalon
2018-03-08 21:17 ` [PATCH] " Stephen Hemminger

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20171219073901.6d048a47@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=xiao.w.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.