Lines Matching refs:file
12 #include <linux/file.h>
31 * If the data is under this limit, there's no point creating a shm file to
59 struct file *file;
75 /* Create a shmem file to store the data in. This will permit the data
79 * Since the key is random for each file, we can set the nonce
102 /* save aligned data to file */
103 file = shmem_kernel_file_setup("", enclen, 0);
104 if (IS_ERR(file)) {
105 ret = PTR_ERR(file);
109 written = kernel_write(file, buf, enclen, &pos);
121 *path = file->f_path;
123 fput(file);
139 fput(file);
223 datalen > BIG_KEY_FILE_THRESHOLD ? "file" : "buff");
240 struct file *file;
249 file = dentry_open(path, O_RDONLY, current_cred());
250 if (IS_ERR(file)) {
251 ret = PTR_ERR(file);
255 /* read file to kernel and decrypt */
256 ret = kernel_read(file, buf, enclen, &pos);
274 fput(file);