0
      ˆl–Ü4ý()¨‰P@Š	›�»q·ÔÅ£Ã0ÁÀ     ˆÄÃƒ.»ÂÁÀ a    /* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Common helpers for stackable filesystems and backing files.
 *
 * Copyright (C) 2023 CTERA Networks.
 */

#ifndef _LINUX_BACKING_FILE_H
#define _LINUX_BACKING_FILE_H

#include <linux/file.h>
#include <linux/uio.h>
#include <linux/fs.h>

struct backing_file_ctx {
	const struct cred *cred;
	struct file *user_file;
	void (*accessed)(struct file *);
	void (*end_write)(struct file *);
};

struct file *backing_file_open(const struct file *user_file, int flags,
			       const struct path *real_path,
			       const struct cred *cred);
ssize_t backing_file_read_iter(struct file *file, struct iov_iter *iter,
			       struct kiocb *iocb, int flags,
			       struct backing_file_ctx *ctx);
ssize_t backing_file_write_iter(struct file *file, struct iov_iter *iter,
				struct kiocb *iocb, int flags,
				struct backing_file_ctx *ctx);
ssize_t backing_file_splice_read(struct file *in, loff_t *ppos,
				 struct pipe_inode_info *pipe, size_t len,
				 unsigned int flags,
				 struct backing_file_ctx *ctx);
ssize_t backing_file_splice_write(struct pipe_inode_info *pipe,
				  struct file *out, loff_t *ppos, size_t len,
				  unsigned int flags,
				  struct backing_file_ctx *ctx);
int backing_file_mmap(struct file *file, struct vm_area_struct *vma,
		      struct backing_file_ctx *ctx);

#endif /* _LINUX_BACKING_FILE_H */
     	ˆÄÃƒ�oÂÁÀ û    	/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_CONTAINER_OF_H
#define _LINUX_CONTAINER_OF_H

#include <linux/build_bug.h>
#include <linux/err.h>

#define typeof_member(T, m)	typeof(((T*)0)->m)

/**
 * container_of - cast a member of a structure out to the containing structure
 * @ptr:	the pointer to the member.
 * @type:	the type of the container struct this is embedded in.
 * @member:	the name of the member within the struct.
 *
 */
#define container_of(ptr, type, member) ({				\
	void *__mptr = (void *)(ptr);					\
	static_assert(__same_type(*(ptr), ((type *)0)->member) ||	\
		      __same_type(*(ptr), void),			\
		      "pointer type mismatch in container_of()");	\
	((type *)(__mptr - offsetof(type, member))); })

/**
 * container_of_const - cast a member of a structure out to the containing
 *			structure and preserve the const-ness of the pointer
 * @ptr:		the pointer to the member
 * @type:		the type of the container struct this is embedded in.
 * @member:		the name of the member within the struct.
 */
#define container_of_const(ptr, type, member)				\
	_Generic(ptr,							\
		const typeof(*(ptr)) *: ((const type *)container_of(ptr, type, member)),\
		default: ((type *)container_of(ptr, type, member))	\
	)

#endif	/* _LINUX_CONTAINER_OF_H */
  0   ˆl–ßi~”êh¥8 Eq–®	µ1hßÄƒt.‹_ŒuÐb&=Ly[Ï¿ÃÂ     ý7zXZ  i"Þ6 !   t/å£à>�Æ] `¡ü@?f—Þ�u�4.F.l1Ê¼ÎwXþûÅ%éúžÔ©jÍ6§¹¤‹å ¶ëfÓ¹ÓÓwÆçáVS2§VÑvÏó•$C‚
‹rOù3Qö/s¼,tk×£N÷\4,F4Ñ*�ÎßÎFF[›*Ÿéôú1‘[„ãDä'³H7ùãÊk‚�
][›6‚Tq?}…}øÖJ`ŒzJªMï�óŒßÓPC«éÃï÷ N:<óÂú™ùº¡fA´Æ�^"[Z<u]•]Šˆ·Jb%ßeÆ§‰Ëð¹®ÍUê¸¤'^’4J¦ïÎ³b�W2Lë®t ^eSË¨ÓdPOÛA”V#›L¤£°û„ö‚¿ÕóÙÅ�œüw¢/f«´ì‚çN6Î5ÜÒ ¡[b9Y™Kî#º'9x¸.Að�?L™9ÁŒ†¤ªõ'úÑSjOÛä)7¬£bx4qQìã˜)ÐM\HF*�¥h6^ÕÆ#xH�r•Eu=ëÑÊ
\a¤áî¼ñ )iÄ:ó^ÀæÍH[ ß:ô~•bG�fÈa)É`ÚcØ&T^>&¯lõ)«Ä™O„‘Ž	6›F¡Õ	åþ0¿Ù+ž;ã¸zß±‡c±}…èhQ–©fVËvçn€ùüƒ×T½B°'.A•*€{¿ª'avDL«l£ƒ^ñprvÍ­”æÛŸíïcF²¼Dh¸/™)¥ù° §®ÂÕZ Óó¬"×k-D‘ª9€faàµÄÝˆs‹­@„@�G¹®˜Cútƒ˜«yi½Fó«¹»ë_MGØçÏ÷0¡&#6²ÉÐÛ‘&²,X63i�+`Gá*\49v+E¼¡îæx«ˆlmÏÒ¯�<yƒ¾7Ü”Ä�üIò…V> L±�$LQ)£“óŠäF&àqÁTZÚÙ Ä¬¿÷BK¯óEß³‚äj-ÉÐÞ�':×ZˆŒ§>äÕÐ< >­?�XÆðTçzaÀæ1û�Ð^{¡Ó�´äôóÄeXŠE	/‹y©ëº <àC"÷ç¯x”çŸÚ“=¡ëîåÉsC—ûZ	ã9‹ƒ\¥Žv?Ñ<–« RH!…ßU6A‘ÊGy6']Ó™ú«†¤‹�¨ŽÐåIU²fƒz‹GÇPõD„GÙf ëÃ2ëøÆM¯ï[
¬_›VîŠ°ðMˆhZ3Š3 z%5”y=u:-”—¬åêºS±„«
 !ù(žŽžy×£çgzáû²P|þÝÃôù�WúE¦|ÄÅèy¾_v²è‡Ž
èñÑñrJWt§i—Ô”ªÌÏuƒòB}[™ÍÖÈ6Ìç§š8Ø1�}+ð1áý½1K2GìÅ¯òJ˜f…e“×À\;/Tqld ÏhLF|l'.X¥êäÝ¡YÔªz a£÷Â1:ÿaï@4Ome'žÑ„¢¤7-ëÛ**¥eùsÞ§>‚Â¦Îsôìƒ»k|‘)©5Ú2JMüøöÁ:Ç&tùÝ˜3ÿ®{úUÇž ÷6ÚnX6É	êÛ
ÚRÎqÄ< MÁí1š£§�FËã¿Ü9V·îPlÉ\à�ðO©Ÿš˜°úB¸L;k-RC™ƒìÍ#¬èú•­�-ü®¡:ÔüL=°^�òLdª