]> www.infradead.org Git - users/jedix/linux-maple.git/commit
lib/buildid: implement sleepable build_id_parse() API
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 29 Aug 2024 17:42:28 +0000 (10:42 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 11 Sep 2024 16:58:31 +0000 (09:58 -0700)
commitad41251c290dfe3c01472c94d2439a59de23fe97
tree1a2c69a27aa431e09596ca551b185747956f6faa
parent45b8fc3096542a53bfd245a9ad8ef870384b4897
lib/buildid: implement sleepable build_id_parse() API

Extend freader with a flag specifying whether it's OK to cause page
fault to fetch file data that is not already physically present in
memory. With this, it's now easy to wait for data if the caller is
running in sleepable (faultable) context.

We utilize read_cache_folio() to bring the desired folio into page
cache, after which the rest of the logic works just the same at folio level.

Suggested-by: Omar Sandoval <osandov@fb.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Eduard Zingerman <eddyz87@gmail.com>
Reviewed-by: Shakeel Butt <shakeel.butt@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20240829174232.3133883-7-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
lib/buildid.c