[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240116-flsplit-v1-2-c9d0f4370a5d@kernel.org>
Date: Tue, 16 Jan 2024 14:45:58 -0500
From: Jeff Layton <jlayton@...nel.org>
To: Christian Brauner <brauner@...nel.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Eric Van Hensbergen <ericvh@...nel.org>,
Latchesar Ionkov <lucho@...kov.net>,
Dominique Martinet <asmadeus@...ewreck.org>,
Christian Schoenebeck <linux_oss@...debyte.com>,
David Howells <dhowells@...hat.com>, Marc Dionne <marc.dionne@...istor.com>,
Xiubo Li <xiubli@...hat.com>, Ilya Dryomov <idryomov@...il.com>,
Alexander Aring <aahringo@...hat.com>, David Teigland <teigland@...hat.com>,
Miklos Szeredi <miklos@...redi.hu>,
Andreas Gruenbacher <agruenba@...hat.com>,
Trond Myklebust <trond.myklebust@...merspace.com>,
Anna Schumaker <anna@...nel.org>, Chuck Lever <chuck.lever@...cle.com>,
Neil Brown <neilb@...e.de>, Olga Kornievskaia <kolga@...app.com>,
Dai Ngo <Dai.Ngo@...cle.com>, Tom Talpey <tom@...pey.com>,
Jan Kara <jack@...e.cz>, Mark Fasheh <mark@...heh.com>,
Joel Becker <jlbec@...lplan.org>, Joseph Qi <joseph.qi@...ux.alibaba.com>,
Steve French <sfrench@...ba.org>, Paulo Alcantara <pc@...guebit.com>,
Ronnie Sahlberg <lsahlber@...hat.com>,
Shyam Prasad N <sprasad@...rosoft.com>, Namjae Jeon <linkinjeon@...nel.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: linux-kernel@...r.kernel.org, v9fs@...ts.linux.dev,
linux-afs@...ts.infradead.org, ceph-devel@...r.kernel.org,
gfs2@...ts.linux.dev, linux-fsdevel@...r.kernel.org,
linux-nfs@...r.kernel.org, ocfs2-devel@...ts.linux.dev,
linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org,
linux-trace-kernel@...r.kernel.org, Jeff Layton <jlayton@...nel.org>
Subject: [PATCH 02/20] filelock: add coccinelle scripts to move fields to
struct file_lock_core
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@...nel.org>
---
cocci/filelock.cocci | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++
cocci/filelock2.cocci | 6 ++++
cocci/nlm.cocci | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 168 insertions(+)
diff --git a/cocci/filelock.cocci b/cocci/filelock.cocci
new file mode 100644
index 000000000000..b84151ba091a
--- /dev/null
+++ b/cocci/filelock.cocci
@@ -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
+)
diff --git a/cocci/filelock2.cocci b/cocci/filelock2.cocci
new file mode 100644
index 000000000000..0154a14e81ca
--- /dev/null
+++ b/cocci/filelock2.cocci
@@ -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)
diff --git a/cocci/nlm.cocci b/cocci/nlm.cocci
new file mode 100644
index 000000000000..8ec5d02871e1
--- /dev/null
+++ b/cocci/nlm.cocci
@@ -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
+)
--
2.43.0
Powered by blists - more mailing lists