From: Christoph Hellwig <hch@infradead.org>
To: Benjamin Coddington <bcodding@redhat.com>
Cc: Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>,
Chuck Lever <chuck.lever@oracle.com>,
linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] nfs/blocklayout: Don't attempt unregister for invalid block device
Date: Tue, 19 Nov 2024 04:42:16 -0800 [thread overview]
Message-ID: <ZzyHqEDt8UXoAUyh@infradead.org> (raw)
In-Reply-To: <eeb62d9260f2e9b61ff5e186eec0048e51bc8758.1731969260.git.bcodding@redhat.com>
On Mon, Nov 18, 2024 at 05:40:40PM -0500, Benjamin Coddington wrote:
> Since commit d869da91cccb, an unmount of a pNFS SCSI layout-enabled NFS
Please also spell out the commit subject in the commit log body, similar
to to the Fixes tag.
> index 6252f4447945..7ae79814f4ff 100644
> --- a/fs/nfs/blocklayout/dev.c
> +++ b/fs/nfs/blocklayout/dev.c
> @@ -16,13 +16,16 @@
>
> static void bl_unregister_scsi(struct pnfs_block_dev *dev)
> {
> - struct block_device *bdev = file_bdev(dev->bdev_file);
> - const struct pr_ops *ops = bdev->bd_disk->fops->pr_ops;
> + struct block_device *bdev;
> + const struct pr_ops *ops;
> int status;
>
> if (!test_and_clear_bit(PNFS_BDEV_REGISTERED, &dev->flags))
> return;
>
> + bdev = file_bdev(dev->bdev_file);
> + ops = bdev->bd_disk->fops->pr_ops;
> +
Hmm. Just moving the test_and_clear_bit to the caller would
feel cleaner than this to me.
But either way the change looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2024-11-19 12:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 22:40 [PATCH 0/2] two fixes for pNFS SCSI device handling Benjamin Coddington
2024-11-18 22:40 ` [PATCH 1/2] nfs/blocklayout: Don't attempt unregister for invalid block device Benjamin Coddington
2024-11-19 12:42 ` Christoph Hellwig [this message]
2024-11-19 13:46 ` Benjamin Coddington
2024-11-18 22:40 ` [PATCH 2/2] nfs/blocklayout: Limit repeat device registration on failure Benjamin Coddington
2024-11-19 12:42 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2024-11-20 14:09 [PATCH v2 0/2] two fixes for pNFS SCSI device handling Benjamin Coddington
2024-11-20 14:09 ` [PATCH 1/2] nfs/blocklayout: Don't attempt unregister for invalid block device Benjamin Coddington
2024-11-20 15:07 ` Chuck Lever
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=ZzyHqEDt8UXoAUyh@infradead.org \
--to=hch@infradead.org \
--cc=anna@kernel.org \
--cc=bcodding@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@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