Lines Matching refs:file
109 struct file *file; member
128 if (vfs_statfs(&acct->file->f_path, &sbuf)) in check_free_space()
205 struct file *file = acct->file; in close_work() local
206 if (file->f_op->flush) in close_work()
207 file->f_op->flush(file, NULL); in close_work()
208 __fput_sync(file); in close_work()
214 struct file *file; in acct_on() local
226 file = file_open_name(pathname, O_WRONLY|O_APPEND|O_LARGEFILE, 0); in acct_on()
227 if (IS_ERR(file)) { in acct_on()
229 return PTR_ERR(file); in acct_on()
232 if (!S_ISREG(file_inode(file)->i_mode)) { in acct_on()
234 filp_close(file, NULL); in acct_on()
238 if (!(file->f_mode & FMODE_CAN_WRITE)) { in acct_on()
240 filp_close(file, NULL); in acct_on()
243 internal = mnt_clone_internal(&file->f_path); in acct_on()
246 filp_close(file, NULL); in acct_on()
253 filp_close(file, NULL); in acct_on()
256 mnt = file->f_path.mnt; in acct_on()
257 file->f_path.mnt = internal; in acct_on()
261 acct->file = file; in acct_on()
497 struct file *file = acct->file; in do_acct_process() local
505 orig_cred = override_creds(file->f_cred); in do_acct_process()
516 ac.ac_uid = from_kuid_munged(file->f_cred->user_ns, orig_cred->uid); in do_acct_process()
517 ac.ac_gid = from_kgid_munged(file->f_cred->user_ns, orig_cred->gid); in do_acct_process()
537 if (file_start_write_trylock(file)) { in do_acct_process()
540 __kernel_write(file, &ac, sizeof(acct_t), &pos); in do_acct_process()
541 file_end_write(file); in do_acct_process()