new file mode 100644
@@ -0,0 +1,81 @@
+@@
+struct file_lock *fl;
+@@
+(
+- fl->fl_blocker
++ fl->fl_core.fl_blocker
+|
+- fl->fl_list
++ fl->fl_core.fl_list
+|
+- fl->fl_link
++ fl->fl_core.fl_link
+|
+- fl->fl_blocked_requests
++ fl->fl_core.fl_blocked_requests
+|
+- fl->fl_blocked_member
++ fl->fl_core.fl_blocked_member
+|
+- fl->fl_owner
++ fl->fl_core.fl_owner
+|
+- fl->fl_flags
++ fl->fl_core.fl_flags
+|
+- fl->fl_type
++ fl->fl_core.fl_type
+|
+- fl->fl_pid
++ fl->fl_core.fl_pid
+|
+- fl->fl_link_cpu
++ fl->fl_core.fl_link_cpu
+|
+- fl->fl_wait
++ fl->fl_core.fl_wait
+|
+- fl->fl_file
++ fl->fl_core.fl_file
+)
+
+@@
+struct file_lock fl;
+@@
+(
+- fl.fl_blocker
++ fl.fl_core.fl_blocker
+|
+- fl.fl_list
++ fl.fl_core.fl_list
+|
+- fl.fl_link
++ fl.fl_core.fl_link
+|
+- fl.fl_blocked_requests
++ fl.fl_core.fl_blocked_requests
+|
+- fl.fl_blocked_member
++ fl.fl_core.fl_blocked_member
+|
+- fl.fl_owner
++ fl.fl_core.fl_owner
+|
+- fl.fl_flags
++ fl.fl_core.fl_flags
+|
+- fl.fl_type
++ fl.fl_core.fl_type
+|
+- fl.fl_pid
++ fl.fl_core.fl_pid
+|
+- fl.fl_link_cpu
++ fl.fl_core.fl_link_cpu
+|
+- fl.fl_wait
++ fl.fl_core.fl_wait
+|
+- fl.fl_file
++ fl.fl_core.fl_file
+)
new file mode 100644
@@ -0,0 +1,6 @@
+@@
+struct file_lock *fl;
+struct list_head *li;
+@@
+- list_for_each_entry(fl, li, fl_list)
++ list_for_each_entry(fl, li, fl_core.fl_list)
new file mode 100644
@@ -0,0 +1,81 @@
+@@
+struct nlm_lock *nlck;
+@@
+(
+- nlck->fl.fl_blocker
++ nlck->fl.fl_core.fl_blocker
+|
+- nlck->fl.fl_list
++ nlck->fl.fl_core.fl_list
+|
+- nlck->fl.fl_link
++ nlck->fl.fl_core.fl_link
+|
+- nlck->fl.fl_blocked_requests
++ nlck->fl.fl_core.fl_blocked_requests
+|
+- nlck->fl.fl_blocked_member
++ nlck->fl.fl_core.fl_blocked_member
+|
+- nlck->fl.fl_owner
++ nlck->fl.fl_core.fl_owner
+|
+- nlck->fl.fl_flags
++ nlck->fl.fl_core.fl_flags
+|
+- nlck->fl.fl_type
++ nlck->fl.fl_core.fl_type
+|
+- nlck->fl.fl_pid
++ nlck->fl.fl_core.fl_pid
+|
+- nlck->fl.fl_link_cpu
++ nlck->fl.fl_core.fl_link_cpu
+|
+- nlck->fl.fl_wait
++ nlck->fl.fl_core.fl_wait
+|
+- nlck->fl.fl_file
++ nlck->fl.fl_core.fl_file
+)
+
+@@
+struct nlm_args *argp;
+@@
+(
+- argp->lock.fl.fl_blocker
++ argp->lock.fl.fl_core.fl_blocker
+|
+- argp->lock.fl.fl_list
++ argp->lock.fl.fl_core.fl_list
+|
+- argp->lock.fl.fl_link
++ argp->lock.fl.fl_core.fl_link
+|
+- argp->lock.fl.fl_blocked_requests
++ argp->lock.fl.fl_core.fl_blocked_requests
+|
+- argp->lock.fl.fl_blocked_member
++ argp->lock.fl.fl_core.fl_blocked_member
+|
+- argp->lock.fl.fl_owner
++ argp->lock.fl.fl_core.fl_owner
+|
+- argp->lock.fl.fl_flags
++ argp->lock.fl.fl_core.fl_flags
+|
+- argp->lock.fl.fl_type
++ argp->lock.fl.fl_core.fl_type
+|
+- argp->lock.fl.fl_pid
++ argp->lock.fl.fl_core.fl_pid
+|
+- argp->lock.fl.fl_link_cpu
++ argp->lock.fl.fl_core.fl_link_cpu
+|
+- argp->lock.fl.fl_wait
++ argp->lock.fl.fl_core.fl_wait
+|
+- argp->lock.fl.fl_file
++ argp->lock.fl.fl_core.fl_file
+)
Add some coccinelle scripts to handle the move of several fields from struct file_lock to struct file_lock_core. Signed-off-by: Jeff Layton <jlayton@kernel.org> --- cocci/filelock.cocci | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++ cocci/filelock2.cocci | 6 ++++ cocci/nlm.cocci | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 168 insertions(+)