mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
fs: Add FOP_HUGE_PAGES
Instead of checking for specific file_operations, add a bit to file_operations which denotes a file that only contain hugetlb pages. This lets us make hugetlbfs_file_operations static, and removes is_file_shm_hugepages() completely. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://lore.kernel.org/r/20240407201122.3783877-1-willy@infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
committed by
Christian Brauner
parent
629171657a
commit
886b94d25a
@@ -16,7 +16,6 @@ struct sysv_shm {
|
||||
|
||||
long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr,
|
||||
unsigned long shmlba);
|
||||
bool is_file_shm_hugepages(struct file *file);
|
||||
void exit_shm(struct task_struct *task);
|
||||
#define shm_init_task(task) INIT_LIST_HEAD(&(task)->sysvshm.shm_clist)
|
||||
#else
|
||||
@@ -30,10 +29,6 @@ static inline long do_shmat(int shmid, char __user *shmaddr,
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
static inline bool is_file_shm_hugepages(struct file *file)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
static inline void exit_shm(struct task_struct *task)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user