diff options
author | Jens Axboe <axboe@kernel.dk> | 2023-01-13 20:47:48 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-01-13 20:47:48 -0700 |
commit | ee16c404f9bd03c6e083f76d45be0b6a774c0d14 (patch) | |
tree | b993b027e9aa674f11c7fdf95222bb944e27151b | |
parent | 3d25b1e8369273d76f5f2634f164236ba9e40d32 (diff) | |
parent | b0907cadabcae6f1248f37a32a6e777f9ff6d4aa (diff) |
Merge branch 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-6.2
Pull MD fix from Song:
"It fixes an issue introduced by recent code refactor."
* 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md:
md: fix incorrect declaration about claim_rdev in md_import_device
-rw-r--r-- | drivers/md/md.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 8af639296b3c..02b0240e7c71 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -3644,7 +3644,7 @@ EXPORT_SYMBOL_GPL(md_rdev_init); */ static struct md_rdev *md_import_device(dev_t newdev, int super_format, int super_minor) { - static struct md_rdev *claim_rdev; /* just for claiming the bdev */ + static struct md_rdev claim_rdev; /* just for claiming the bdev */ struct md_rdev *rdev; sector_t size; int err; @@ -3662,7 +3662,7 @@ static struct md_rdev *md_import_device(dev_t newdev, int super_format, int supe rdev->bdev = blkdev_get_by_dev(newdev, FMODE_READ | FMODE_WRITE | FMODE_EXCL, - super_format == -2 ? claim_rdev : rdev); + super_format == -2 ? &claim_rdev : rdev); if (IS_ERR(rdev->bdev)) { pr_warn("md: could not open device unknown-block(%u,%u).\n", MAJOR(newdev), MINOR(newdev)); |