Re: [PATCH v2] mm: Cleanup __put_devmap_managed_page() vs ->page_free()

From: Christoph Hellwig
Date: Thu Nov 14 2019 - 07:32:42 EST


On Thu, Nov 14, 2019 at 12:20:13AM -0800, Dan Williams wrote:
> + if (count > 1) {
> + /* still busy */
> + return;
> + } else if (count == 0) {
> + /* only triggered by the dev_pagemap shutdown path */
> + __put_page(page);
> + return;
> + } else if (!is_device_private_page(page)) {
> + /* notify page idle for dax */
> + wake_up_var(&page->_refcount);
> + return;
> + }

No need for an else after a return.