Re: [PATCH] mm, notifier: Fix early return case for new lockdep annotations

From: Jason Gunthorpe
Date: Sat Sep 07 2019 - 03:34:29 EST


On Fri, Sep 06, 2019 at 07:47:30PM +0200, Daniel Vetter wrote:

> diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
> index 5a03417e5bf7..4edd98b06834 100644
> +++ b/include/linux/mmu_notifier.h
> @@ -356,13 +356,14 @@ mmu_notifier_invalidate_range_start(struct mmu_notifier_range *range)
> static inline int
> mmu_notifier_invalidate_range_start_nonblock(struct mmu_notifier_range *range)
> {
> + int ret = 0;
> lock_map_acquire(&__mmu_notifier_invalidate_range_start_map);
> if (mm_has_notifiers(range->mm)) {
> range->flags &= ~MMU_NOTIFIER_RANGE_BLOCKABLE;
> - return __mmu_notifier_invalidate_range_start(range);
> + ret = __mmu_notifier_invalidate_range_start(range);
> }
> lock_map_release(&__mmu_notifier_invalidate_range_start_map);
> - return 0;
> + return ret;

Gar, yes. Since nobody has grabbed hmm.git I've squashed this into the
original patch and fixed the checkpatch warning about missing line
after the ret

Everything should be in linux-next the next time it builds

Thanks,
Jason