libfs: add simple_open()
debugfs and a few other drivers use an open-coded version of simple_open() to pass a pointer from the file to the read/write file ops. Add support for this simple case to libfs so that we can remove the many duplicate copies of this simple function. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
7563ec4c21
commit
20955e891d
@@ -2502,6 +2502,7 @@ extern int dcache_readdir(struct file *, void *, filldir_t);
|
||||
extern int simple_setattr(struct dentry *, struct iattr *);
|
||||
extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *);
|
||||
extern int simple_statfs(struct dentry *, struct kstatfs *);
|
||||
extern int simple_open(struct inode *inode, struct file *file);
|
||||
extern int simple_link(struct dentry *, struct inode *, struct dentry *);
|
||||
extern int simple_unlink(struct inode *, struct dentry *);
|
||||
extern int simple_rmdir(struct inode *, struct dentry *);
|
||||
|
||||
Reference in New Issue
Block a user