lkml.org 
[lkml]   [2022]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 04/11] md/raid5-cache: Take mddev_lock in r5c_journal_mode_show()


On 2022-06-03 00:39, Christoph Hellwig wrote:
> 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.
>

Ok, yup, I'll fix these issues up and send an updated series next week.

Logan

\
 
 \ /
  Last update: 2022-06-03 23:48    [W:0.058 / U:2.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site