Lines Matching defs:seals
140 return &SHMEM_I(file_inode(file))->seals;
144 return &HUGETLBFS_I(file_inode(file))->seals;
157 static int memfd_add_seals(struct file *file, unsigned int seals)
175 * following seals are defined:
176 * SEAL_SEAL: Prevent further seals from being set on this file
183 * must prevent seals from being removed. Therefore, sealing a file
184 * only adds a given set of seals to the file, it never touches
185 * existing seals. Furthermore, the "setting seals"-operation can be
191 * importantly, seals are never written to disk. Therefore, there's
197 if (seals & ~(unsigned int)F_ALL_SEALS)
213 if ((seals & F_SEAL_WRITE) && !(*file_seals & F_SEAL_WRITE)) {
228 if (seals & F_SEAL_EXEC && inode->i_mode & 0111)
229 seals |= F_SEAL_SHRINK|F_SEAL_GROW|F_SEAL_WRITE|F_SEAL_FUTURE_WRITE;
231 *file_seals |= seals;
241 unsigned int *seals = memfd_file_seals_ptr(file);
243 return seals ? *seals : -EINVAL;