linux/fs/dlm
Stephen Boyd 234e340582 simple_open: automatically convert to simple_open()
Many users of debugfs copy the implementation of default_open() when
they want to support a custom read/write function op.  This leads to a
proliferation of the default_open() implementation across the entire
tree.

Now that the common implementation has been consolidated into libfs we
can replace all the users of this function with simple_open().

This replacement was done with the following semantic patch:

<smpl>
@ open @
identifier open_f != simple_open;
identifier i, f;
@@
-int open_f(struct inode *i, struct file *f)
-{
(
-if (i->i_private)
-f->private_data = i->i_private;
|
-f->private_data = i->i_private;
)
-return 0;
-}

@ has_open depends on open @
identifier fops;
identifier open.open_f;
@@
struct file_operations fops = {
...
-.open = open_f,
+.open = simple_open,
...
};
</smpl>

[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-05 15:25:50 -07:00
..
ast.c
ast.h
config.c dlm: add recovery callbacks 2012-01-04 08:56:31 -06:00
config.h dlm: add recovery callbacks 2012-01-04 08:56:31 -06:00
debug_fs.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
dir.c dlm: fix slow rsb search in dir recovery 2012-03-08 14:46:30 -06:00
dir.h
dlm_internal.h dlm: add recovery callbacks 2012-01-04 08:56:31 -06:00
Kconfig
lock.c dlm: fix slow rsb search in dir recovery 2012-03-08 14:46:30 -06:00
lock.h dlm: fix slow rsb search in dir recovery 2012-03-08 14:46:30 -06:00
lockspace.c dlm: add recovery callbacks 2012-01-04 08:56:31 -06:00
lockspace.h
lowcomms.c dlm for 3.4 2012-03-21 13:54:22 -07:00
lowcomms.h
lvb_table.h
main.c
Makefile
member.c dlm: add recovery callbacks 2012-01-04 08:56:31 -06:00
member.h dlm: add recovery callbacks 2012-01-04 08:56:31 -06:00
memory.c
memory.h
midcomms.c
midcomms.h
netlink.c
plock.c
rcom.c dlm: add node slots and generation 2012-01-04 08:55:57 -06:00
rcom.h dlm: add node slots and generation 2012-01-04 08:55:57 -06:00
recover.c dlm: add node slots and generation 2012-01-04 08:55:57 -06:00
recover.h
recoverd.c dlm: add recovery callbacks 2012-01-04 08:56:31 -06:00
recoverd.h
requestqueue.c
requestqueue.h
user.c dlm: add recovery callbacks 2012-01-04 08:56:31 -06:00
user.h
util.c
util.h