Lines Matching full:file

6 #include <linux/file.h>
136 struct file *file; in SYSCALL_DEFINE1() local
141 file = fget_light(fd, &fput_needed); in SYSCALL_DEFINE1()
142 if (!file) in SYSCALL_DEFINE1()
144 sb = file->f_dentry->d_sb; in SYSCALL_DEFINE1()
150 fput_light(file, fput_needed); in SYSCALL_DEFINE1()
156 * @file: file to sync
161 * Write back data in range @start..@end and metadata for @file to disk. If
162 * @datasync is set only metadata needed to access modified file data is
165 int vfs_fsync_range(struct file *file, loff_t start, loff_t end, int datasync) in vfs_fsync_range() argument
167 if (!file->f_op || !file->f_op->fsync) in vfs_fsync_range()
169 return file->f_op->fsync(file, start, end, datasync); in vfs_fsync_range()
174 * vfs_fsync - perform a fsync or fdatasync on a file
175 * @file: file to sync
178 * Write back data and metadata for @file to disk. If @datasync is
179 * set only metadata needed to access modified file data is written.
181 int vfs_fsync(struct file *file, int datasync) in vfs_fsync() argument
183 return vfs_fsync_range(file, 0, LLONG_MAX, datasync); in vfs_fsync()
189 struct file *file; in do_fsync() local
192 file = fget(fd); in do_fsync()
193 if (file) { in do_fsync()
194 ret = vfs_fsync(file, datasync); in do_fsync()
195 fput(file); in do_fsync()
211 * generic_write_sync - perform syncing after a write if file / inode is sync
212 * @file: file to which the write happened
218 int generic_write_sync(struct file *file, loff_t pos, loff_t count) in generic_write_sync() argument
220 if (!(file->f_flags & O_DSYNC) && !IS_SYNC(file->f_mapping->host)) in generic_write_sync()
222 return vfs_fsync_range(file, pos, pos + count - 1, in generic_write_sync()
223 (file->f_flags & __O_SYNC) ? 0 : 1); in generic_write_sync()
229 * a file in the range offset .. (offset+nbytes-1) inclusive. If nbytes is
269 * It should be noted that none of these operations write out the file's
278 struct file *file; in SYSCALL_DEFINE() local
320 file = fget_light(fd, &fput_needed); in SYSCALL_DEFINE()
321 if (!file) in SYSCALL_DEFINE()
324 i_mode = file->f_path.dentry->d_inode->i_mode; in SYSCALL_DEFINE()
330 mapping = file->f_mapping; in SYSCALL_DEFINE()
353 fput_light(file, fput_needed); in SYSCALL_DEFINE()