]> git.baikalelectronics.ru Git - kernel.git/commit
mm: optimize dev_pagemap reference counting around get_dev_pagemap
authorChristoph Hellwig <hch@lst.de>
Fri, 29 Dec 2017 07:54:01 +0000 (08:54 +0100)
committerDan Williams <dan.j.williams@intel.com>
Mon, 8 Jan 2018 19:46:23 +0000 (11:46 -0800)
commit965848a3e996f11ad17dc1a9dd389a6106e03955
tree72b34c8b3ae395aedaf444246073791ab20ea3c1
parentd27607136b793580f758b8f50a54337c6e9db86d
mm: optimize dev_pagemap reference counting around get_dev_pagemap

Change the calling convention so that get_dev_pagemap always consumes the
previous reference instead of doing this using an explicit earlier call to
put_dev_pagemap in the callers.

The callers will still need to put the final reference after finishing the
loop over the pages.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
kernel/memremap.c
mm/gup.c