Files
android_kernel_xiaomi_sm8450/include/linux
John Hubbard 566d774a11 mm: introduce page_ref_sub_return()
An upcoming patch requires subtracting a large chunk of refcounts from a
page, and checking what the resulting refcount is.  This is a little
different than the usual "check for zero refcount" that many of the page
ref functions already do.  However, it is similar to a few other routines
that (like this one) are generally useful for things such as 1-based
refcounting.

Add page_ref_sub_return(), that subtracts a chunk of refcounts atomically,
and returns an atomic snapshot of the result.

Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Jérôme Glisse <jglisse@redhat.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Link: http://lkml.kernel.org/r/20200211001536.1027652-4-jhubbard@nvidia.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-04-02 09:35:27 -07:00
..
2020-02-16 18:30:41 -08:00
2019-12-11 09:12:38 +01:00
2019-11-12 11:43:29 -05:00
2020-03-27 12:04:34 -06:00
2020-02-04 03:05:26 +00:00
2020-02-04 03:05:26 +00:00
2020-03-30 01:34:00 +02:00
2020-01-23 00:35:50 +01:00
2019-10-09 19:33:43 -07:00
2020-03-09 11:12:19 +01:00
2019-12-03 11:20:37 +01:00
2020-02-17 13:37:00 +01:00
2020-01-27 11:09:31 +01:00
2020-01-17 16:48:07 -08:00
2020-01-18 09:19:18 -05:00
2020-03-13 12:49:51 -07:00
2020-03-06 11:06:15 +01:00
2019-12-01 12:59:06 -08:00
2020-03-23 11:17:22 +01:00
2019-10-04 12:31:46 -07:00
2019-10-15 13:34:25 +02:00
2020-03-21 16:00:24 +01:00
2019-12-04 19:44:14 -08:00
2020-01-31 17:33:54 +00:00
2020-02-20 21:17:24 +01:00
2019-12-11 09:12:38 +01:00
2020-03-06 11:56:59 +01:00
2019-12-09 10:55:03 +01:00
2020-03-21 16:00:24 +01:00
2019-11-14 19:06:47 -08:00
2020-01-15 10:54:33 -05:00
2020-01-14 12:20:48 +01:00
2019-12-11 16:37:02 +08:00
2020-04-02 09:35:27 -07:00
2019-11-13 19:09:47 +08:00
2020-03-12 07:44:17 -06:00
2020-01-15 16:30:28 +00:00
2020-03-17 18:31:05 +01:00
2019-12-06 10:47:28 +01:00
2020-03-12 17:33:11 -07:00
2020-01-13 18:16:43 -08:00
2019-11-14 13:07:48 +08:00
2020-03-21 16:00:24 +01:00
2020-02-21 10:31:18 +01:00
2020-03-29 21:53:18 -07:00
2020-02-04 03:05:24 +00:00
2020-03-21 16:00:24 +01:00
2020-03-02 14:04:31 -07:00
2019-11-13 12:15:34 -08:00
2020-02-04 03:05:26 +00:00
2020-02-21 11:22:15 -08:00
2020-01-14 12:20:48 +01:00
2020-03-23 17:01:47 +01:00
2020-03-21 18:56:06 -07:00
2019-11-14 12:20:02 +08:00
2020-01-17 22:33:37 -05:00