linux_dsm_epyc7002/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 dlm: don't limit active work items 2011-07-19 14:22:32 -05:00
ast.h dlm: use workqueue for callbacks 2011-07-15 12:30:43 -05:00
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] The core of the DLM for GFS2/CLVM 2006-01-18 09:30:29 +00:00
dlm_internal.h dlm: add recovery callbacks 2012-01-04 08:56:31 -06:00
Kconfig dlm: Make DLM depend on CONFIGFS_FS 2011-01-16 21:22:37 +00:00
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 dlm: detect available userspace daemon 2008-08-28 11:49:43 -05:00
lowcomms.c dlm for 3.4 2012-03-21 13:54:22 -07:00
lowcomms.h dlm: connect to nodes earlier 2009-05-15 09:34:12 -05:00
lvb_table.h [DLM] The core of the DLM for GFS2/CLVM 2006-01-18 09:30:29 +00:00
main.c dlm: Drop __TIME__ usage 2011-05-26 09:46:17 +02:00
Makefile dlm: move plock code from gfs2 2008-04-21 11:22:28 -05:00
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 dlm: improve rsb searches 2011-07-12 16:02:09 -05:00
memory.h dlm: improve rsb searches 2011-07-12 16:02:09 -05:00
midcomms.c dlm: fix up memory allocation flags 2008-12-23 10:15:40 -06:00
midcomms.h [DLM] The core of the DLM for GFS2/CLVM 2006-01-18 09:30:29 +00:00
netlink.c dlm: use genl_register_family_with_ops() 2010-08-05 14:22:01 -05:00
plock.c locks: rename lock-manager ops 2011-07-20 20:23:19 -04:00
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 [DLM] The core of the DLM for GFS2/CLVM 2006-01-18 09:30:29 +00:00
recoverd.c dlm: add recovery callbacks 2012-01-04 08:56:31 -06:00
recoverd.h [DLM] The core of the DLM for GFS2/CLVM 2006-01-18 09:30:29 +00:00
requestqueue.c dlm: always use GFP_NOFS 2009-11-30 16:34:43 -06:00
requestqueue.h dlm: use proper C for dlm/requestqueue stuff (and fix alignment bug) 2008-02-04 01:21:32 -06:00
user.c dlm: add recovery callbacks 2012-01-04 08:56:31 -06:00
user.h dlm: record full callback state 2011-03-10 10:40:00 -06:00
util.c dlm: do not byteswap rcom_config 2008-02-04 01:23:43 -06:00
util.h [DLM] The core of the DLM for GFS2/CLVM 2006-01-18 09:30:29 +00:00