diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-04-17 10:42:54 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-04-17 11:08:07 -0700 |
commit | 8203c7ce4ef2840929d38b447b4ccd384727f92b (patch) | |
tree | 07b4079057e035a4063788f120665f5e42967e8e /drivers/nvdimm/bus.c | |
parent | 474f459360399c5becfd0f189a8894e9e17ad3d3 (diff) | |
parent | 88a5af943985fb43b4c9472b5abd9c0b9705533d (diff) | |
download | linux-8203c7ce4ef2840929d38b447b4ccd384727f92b.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
- keep the ZC code, drop the code related to reinit
net/bridge/netfilter/ebtables.c
- fix build after move to net_generic
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/nvdimm/bus.c')
-rw-r--r-- | drivers/nvdimm/bus.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index 48f0985ca8a0..3a777d0073b7 100644 --- a/drivers/nvdimm/bus.c +++ b/drivers/nvdimm/bus.c @@ -631,16 +631,14 @@ void nvdimm_check_and_set_ro(struct gendisk *disk) struct nd_region *nd_region = to_nd_region(dev->parent); int disk_ro = get_disk_ro(disk); - /* - * Upgrade to read-only if the region is read-only preserve as - * read-only if the disk is already read-only. - */ - if (disk_ro || nd_region->ro == disk_ro) + /* catch the disk up with the region ro state */ + if (disk_ro == nd_region->ro) return; - dev_info(dev, "%s read-only, marking %s read-only\n", - dev_name(&nd_region->dev), disk->disk_name); - set_disk_ro(disk, 1); + dev_info(dev, "%s read-%s, marking %s read-%s\n", + dev_name(&nd_region->dev), nd_region->ro ? "only" : "write", + disk->disk_name, nd_region->ro ? "only" : "write"); + set_disk_ro(disk, nd_region->ro); } EXPORT_SYMBOL(nvdimm_check_and_set_ro); |