All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Lihong Kou <koulihong@huawei.com>
Cc: axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me,
	linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Subject: Re: [PATCH v2] block: nvme: fix the NULL ptr bug in bio_integrity_verify_fn
Date: Mon, 13 Sep 2021 08:13:03 +0200	[thread overview]
Message-ID: <20210913061303.GA4324@lst.de> (raw)
In-Reply-To: <20210911024906.1125259-1-koulihong@huawei.com>

> -	blk_integrity_unregister(disk);
> +	if (blk_get_integrity(disk))
> +		blk_integrity_unregister(disk);

Instead of open coding this in the callers I think we should make
blk_integrity_unregister a no-op if no integrity profile was registered.
Also please split this into two logically separate patches.

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Lihong Kou <koulihong@huawei.com>
Cc: axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me,
	linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Subject: Re: [PATCH v2] block: nvme: fix the NULL ptr bug in bio_integrity_verify_fn
Date: Mon, 13 Sep 2021 08:13:03 +0200	[thread overview]
Message-ID: <20210913061303.GA4324@lst.de> (raw)
In-Reply-To: <20210911024906.1125259-1-koulihong@huawei.com>

> -	blk_integrity_unregister(disk);
> +	if (blk_get_integrity(disk))
> +		blk_integrity_unregister(disk);

Instead of open coding this in the callers I think we should make
blk_integrity_unregister a no-op if no integrity profile was registered.
Also please split this into two logically separate patches.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2021-09-13  6:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-11  2:49 [PATCH v2] block: nvme: fix the NULL ptr bug in bio_integrity_verify_fn Lihong Kou
2021-09-11  2:49 ` Lihong Kou
2021-09-13  6:13 ` Christoph Hellwig [this message]
2021-09-13  6:13   ` Christoph Hellwig
     [not found]   ` <ad51e8bf2bf04e9f9b1ff9ab36718935@huawei.com>
2021-09-14  6:20     ` Christoph Hellwig
2021-09-14  6:20       ` Christoph Hellwig

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=20210913061303.GA4324@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=kbusch@kernel.org \
    --cc=koulihong@huawei.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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.