summaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-11-29 18:04:08 -0500
committerJeff Layton <jlayton@kernel.org>2018-11-30 11:26:12 -0500
commitada5c1da8660ecae24b3e75c18ee77d79e099fee (patch)
treec1579a9a4924fa11b6fc49cc9bdb7e5f3e59aae4 /include/linux/fs.h
parentccda4af0f4b92f7b4c308d3acc262f4a7e3affad (diff)
fs/locks: rename some lists and pointers.
struct file lock contains an 'fl_next' pointer which is used to point to the lock that this request is blocked waiting for. So rename it to fl_blocker. The fl_blocked list_head in an active lock is the head of a list of blocked requests. In a request it is a node in that list. These are two distinct uses, so replace with two list_heads with different names. fl_blocked_requests is the head of a list of blocked requests fl_blocked_member is a node in a member of that list. The two different list_heads are never used at the same time, but that will change in a future patch. Note that a tracepoint is changed to report fl_blocker instead of fl_next. Signed-off-by: NeilBrown <neilb@suse.com> Reviewed-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index c95c0807471f..16df3a7df378 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1044,10 +1044,15 @@ bool opens_in_grace(struct net *);
1044 * Obviously, the last two criteria only matter for POSIX locks. 1044 * Obviously, the last two criteria only matter for POSIX locks.
1045 */ 1045 */
1046struct file_lock { 1046struct file_lock {
1047 struct file_lock *fl_next; /* singly linked list for this inode */ 1047 struct file_lock *fl_blocker; /* The lock, that is blocking us */
1048 struct list_head fl_list; /* link into file_lock_context */ 1048 struct list_head fl_list; /* link into file_lock_context */
1049 struct hlist_node fl_link; /* node in global lists */ 1049 struct hlist_node fl_link; /* node in global lists */
1050 struct list_head fl_block; /* circular list of blocked processes */ 1050 struct list_head fl_blocked_requests; /* list of requests with
1051 * ->fl_blocker pointing here
1052 */
1053 struct list_head fl_blocked_member; /* node in
1054 * ->fl_blocker->fl_blocked_requests
1055 */
1051 fl_owner_t fl_owner; 1056 fl_owner_t fl_owner;
1052 unsigned int fl_flags; 1057 unsigned int fl_flags;
1053 unsigned char fl_type; 1058 unsigned char fl_type;