• Home
  • Raw
  • Download

Lines Matching refs:filp

47 #define F_DENTRY(filp) ((filp)->f_path.dentry)  argument
49 const struct file_operations *debugfs_real_fops(const struct file *filp) in debugfs_real_fops() argument
51 struct debugfs_fsdata *fsd = F_DENTRY(filp)->d_fsdata; in debugfs_real_fops()
146 struct file *filp, in debugfs_locked_down() argument
150 !(filp->f_mode & FMODE_WRITE) && in debugfs_locked_down()
162 static int open_proxy_open(struct inode *inode, struct file *filp) in open_proxy_open() argument
164 struct dentry *dentry = F_DENTRY(filp); in open_proxy_open()
172 real_fops = debugfs_real_fops(filp); in open_proxy_open()
174 r = debugfs_locked_down(inode, filp, real_fops); in open_proxy_open()
186 replace_fops(filp, real_fops); in open_proxy_open()
189 r = real_fops->open(inode, filp); in open_proxy_open()
203 #define FULL_PROXY_FUNC(name, ret_type, filp, proto, args) \ argument
206 struct dentry *dentry = F_DENTRY(filp); \
213 real_fops = debugfs_real_fops(filp); \
219 FULL_PROXY_FUNC(llseek, loff_t, filp,
220 PROTO(struct file *filp, loff_t offset, int whence),
221 ARGS(filp, offset, whence));
223 FULL_PROXY_FUNC(read, ssize_t, filp,
224 PROTO(struct file *filp, char __user *buf, size_t size,
226 ARGS(filp, buf, size, ppos));
228 FULL_PROXY_FUNC(write, ssize_t, filp,
229 PROTO(struct file *filp, const char __user *buf, size_t size,
231 ARGS(filp, buf, size, ppos));
233 FULL_PROXY_FUNC(unlocked_ioctl, long, filp,
234 PROTO(struct file *filp, unsigned int cmd, unsigned long arg),
235 ARGS(filp, cmd, arg));
237 static __poll_t full_proxy_poll(struct file *filp, in full_proxy_poll() argument
240 struct dentry *dentry = F_DENTRY(filp); in full_proxy_poll()
247 real_fops = debugfs_real_fops(filp); in full_proxy_poll()
248 r = real_fops->poll(filp, wait); in full_proxy_poll()
253 static int full_proxy_release(struct inode *inode, struct file *filp) in full_proxy_release() argument
255 const struct dentry *dentry = F_DENTRY(filp); in full_proxy_release()
256 const struct file_operations *real_fops = debugfs_real_fops(filp); in full_proxy_release()
257 const struct file_operations *proxy_fops = filp->f_op; in full_proxy_release()
267 r = real_fops->release(inode, filp); in full_proxy_release()
269 replace_fops(filp, d_inode(dentry)->i_fop); in full_proxy_release()
291 static int full_proxy_open(struct inode *inode, struct file *filp) in full_proxy_open() argument
293 struct dentry *dentry = F_DENTRY(filp); in full_proxy_open()
302 real_fops = debugfs_real_fops(filp); in full_proxy_open()
304 r = debugfs_locked_down(inode, filp, real_fops); in full_proxy_open()
323 replace_fops(filp, proxy_fops); in full_proxy_open()
326 r = real_fops->open(inode, filp); in full_proxy_open()
328 replace_fops(filp, d_inode(dentry)->i_fop); in full_proxy_open()
330 } else if (filp->f_op != proxy_fops) { in full_proxy_open()