Lines Matching refs:file
79 struct pid_namespace *ns, struct file *);
89 struct file *file; member
110 static int check_free_space(struct bsd_acct_struct *acct, struct file *file) in check_free_space() argument
120 if (!file || !acct->needcheck) in check_free_space()
125 if (vfs_statfs(file->f_path.dentry, &sbuf)) in check_free_space()
145 if (file != acct->file) { in check_free_space()
179 static void acct_file_reopen(struct bsd_acct_struct *acct, struct file *file, in acct_file_reopen() argument
182 struct file *old_acct = NULL; in acct_file_reopen()
185 if (acct->file) { in acct_file_reopen()
186 old_acct = acct->file; in acct_file_reopen()
191 acct->file = NULL; in acct_file_reopen()
195 if (file) { in acct_file_reopen()
196 acct->file = file; in acct_file_reopen()
217 struct file *file; in acct_on() local
223 file = filp_open(name, O_WRONLY|O_APPEND|O_LARGEFILE, 0); in acct_on()
224 if (IS_ERR(file)) in acct_on()
225 return PTR_ERR(file); in acct_on()
227 if (!S_ISREG(file->f_path.dentry->d_inode->i_mode)) { in acct_on()
228 filp_close(file, NULL); in acct_on()
232 if (!file->f_op->write) { in acct_on()
233 filp_close(file, NULL); in acct_on()
241 filp_close(file, NULL); in acct_on()
246 error = security_acct(file); in acct_on()
249 filp_close(file, NULL); in acct_on()
259 mnt_pin(file->f_path.mnt); in acct_on()
260 acct_file_reopen(ns->bacct, file, ns); in acct_on()
263 mntput(file->f_path.mnt); /* it's pinned, now give up active reference */ in acct_on()
324 if (acct->file && acct->file->f_path.mnt == m) { in acct_auto_close_mnt()
345 if (acct->file && acct->file->f_path.mnt->mnt_sb == sb) { in acct_auto_close()
359 if (acct->file != NULL) in acct_exit_ns()
482 struct pid_namespace *ns, struct file *file) in do_acct_process() argument
497 if (!check_free_space(acct, file)) in do_acct_process()
575 file->f_op->write(file, (char *)&ac, in do_acct_process()
576 sizeof(acct_t), &file->f_pos); in do_acct_process()
635 struct file *file = NULL; in acct_process_in_ns() local
642 if (!acct || !acct->file) in acct_process_in_ns()
646 file = acct->file; in acct_process_in_ns()
647 if (unlikely(!file)) { in acct_process_in_ns()
651 get_file(file); in acct_process_in_ns()
654 do_acct_process(acct, ns, file); in acct_process_in_ns()
655 fput(file); in acct_process_in_ns()