pipe: use f_pipe
authorChristian Brauner <brauner@kernel.org>
Fri, 30 Aug 2024 13:05:00 +0000 (15:05 +0200)
committerChristian Brauner <brauner@kernel.org>
Thu, 12 Sep 2024 09:58:45 +0000 (11:58 +0200)
commit5a957bbac3ab9808a8df711a269e4d18f84e9e4a
tree2e413cde798882e5b22b43c1699712b371ec3ecd
parent5e9b50dea970ae6d3e1309d4254157099734a2af
pipe: use f_pipe

Pipes use f_version to defer poll notifications until a write has been
observed. Since multiple file's refer to the same struct pipe_inode_info
in their ->private_data moving it into their isn't feasible since we
would need to introduce an additional pointer indirection.

However, since pipes don't require f_pos_lock we placed a new f_pipe
member into a union with f_pos_lock that pipes can use. This is similar
to what we already do for struct inode where we have additional fields
per file type. This will allow us to fully remove f_version in the next
step.

Link: https://lore.kernel.org/r/20240830-vfs-file-f_version-v1-19-6d3e4816aa7b@kernel.org
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/pipe.c