Messages in this thread | | | Date | Thu, 2 Jun 2022 23:39:52 -0700 | From | Christoph Hellwig <> | Subject | Re: [PATCH v3 04/11] md/raid5-cache: Take mddev_lock in r5c_journal_mode_show() |
| |
On Thu, Jun 02, 2022 at 12:18:10PM -0600, Logan Gunthorpe wrote: > conf = mddev->private; > if (!conf || !conf->log) { > - spin_unlock(&mddev->lock); > + mddev_unlock(mddev); > return 0; > } > > @@ -2557,7 +2560,7 @@ static ssize_t r5c_journal_mode_show(struct mddev *mddev, char *page) > default: > ret = 0; > } > - spin_unlock(&mddev->lock); > + mddev_unlock(mddev); > return ret;
Using a goto out_unlock would be nice here to keep the critical sections simple. But even as-is this looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
> + lockdep_assert_held(&conf->mddev->reconfig_mutex); > +
.. but this looks unrelated and misplaced in this patch.
| |