summaryrefslogtreecommitdiff
path: root/include/linux/memfd.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2025-01-08 11:58:49 +0000
committerMark Brown <broonie@kernel.org>2025-01-08 11:58:49 +0000
commit309caeef4381e8777f65030dccabc71456650269 (patch)
treef726473c478fca19db793ebe27a3da0162fd23bc /include/linux/memfd.h
parentc51187903fe4523fd7f521662c1ae1f1f3174036 (diff)
parent9d89551994a430b50c4fffcb1e617a057fa76e20 (diff)
ASoC: Merge up v6.13-rc6
This helps several of my boards in CI.
Diffstat (limited to 'include/linux/memfd.h')
-rw-r--r--include/linux/memfd.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/memfd.h b/include/linux/memfd.h
index 3f2cf339ceaf..d437e3070850 100644
--- a/include/linux/memfd.h
+++ b/include/linux/memfd.h
@@ -7,6 +7,7 @@
#ifdef CONFIG_MEMFD_CREATE
extern long memfd_fcntl(struct file *file, unsigned int cmd, unsigned int arg);
struct folio *memfd_alloc_folio(struct file *memfd, pgoff_t idx);
+unsigned int *memfd_file_seals_ptr(struct file *file);
#else
static inline long memfd_fcntl(struct file *f, unsigned int c, unsigned int a)
{
@@ -16,6 +17,19 @@ static inline struct folio *memfd_alloc_folio(struct file *memfd, pgoff_t idx)
{
return ERR_PTR(-EINVAL);
}
+
+static inline unsigned int *memfd_file_seals_ptr(struct file *file)
+{
+ return NULL;
+}
#endif
+/* Retrieve memfd seals associated with the file, if any. */
+static inline unsigned int memfd_file_seals(struct file *file)
+{
+ unsigned int *sealsp = memfd_file_seals_ptr(file);
+
+ return sealsp ? *sealsp : 0;
+}
+
#endif /* __LINUX_MEMFD_H */