Netdev List
 help / color / mirror / Atom feed
From: santosh.shilimkar@oracle.com
To: Gerd Rausch <gerd.rausch@oracle.com>, netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>
Subject: Re: [PATCH net-next 5/7] net/rds: Set fr_state only to FRMR_IS_FREE if IB_WR_LOCAL_INV had been successful
Date: Mon, 1 Jul 2019 13:14:54 -0700	[thread overview]
Message-ID: <42f2bf75-f267-7049-57dd-7ccce2ed1337@oracle.com> (raw)
In-Reply-To: <eb94e6bf-cbde-8cf1-b139-66fc8351f181@oracle.com>

On 7/1/19 9:40 AM, Gerd Rausch wrote:
> Fix a bug where fr_state first goes to FRMR_IS_STALE, because of a failure
> of operation IB_WR_LOCAL_INV, but then gets set back to "FRMR_IS_FREE"
> uncoditionally, even though the operation failed.
> 
> Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com>
> ---
>   net/rds/ib_frmr.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/rds/ib_frmr.c b/net/rds/ib_frmr.c
> index 3c953034dca3..a5d8f4128515 100644
> --- a/net/rds/ib_frmr.c
> +++ b/net/rds/ib_frmr.c
> @@ -328,7 +328,8 @@ void rds_ib_mr_cqe_handler(struct rds_ib_connection *ic, struct ib_wc *wc)
>   	}
>   
>   	if (frmr->fr_inv) {
> -		frmr->fr_state = FRMR_IS_FREE;
> +		if (frmr->fr_state == FRMR_IS_INUSE)
> +			frmr->fr_state = FRMR_IS_FREE;
>   		frmr->fr_inv = false;
>   		wake_up(&frmr->fr_inv_done);
>   	}
> 
Looks good to me. Will add this to other fixes.

      reply	other threads:[~2019-07-01 20:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01 16:40 [PATCH net-next 5/7] net/rds: Set fr_state only to FRMR_IS_FREE if IB_WR_LOCAL_INV had been successful Gerd Rausch
2019-07-01 20:14 ` santosh.shilimkar [this message]

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=42f2bf75-f267-7049-57dd-7ccce2ed1337@oracle.com \
    --to=santosh.shilimkar@oracle.com \
    --cc=davem@davemloft.net \
    --cc=gerd.rausch@oracle.com \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox