]> Gentwo Git Trees - linux/.git/commit
convert devpts
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 26 Feb 2024 07:34:49 +0000 (02:34 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 16 Nov 2025 06:35:04 +0000 (01:35 -0500)
commitb4a76faf9d960fd87cf03166aeab65a9d5aa9c83
treefb0d3ae58c9614fc2766de8d5b888c7ce1d20846
parentb83431564db66cd854954a43e27bfd26b09575ea
convert devpts

Two kinds of objects there - ptmx and everything else (pty).  The former is
created on mount and kept until the fs shutdown; the latter get created
and removed by tty layer (the references are borrowed into tty->driver_data).
The reference to ptmx dentry is also kept, but we only ever use it to
find ptmx inode on remount.

* turn d_add() into d_make_persistent() + dput()  both in mknod_ptmx() and
in devpts_pty_new().

* turn dput() to d_make_discardable() in devpts_pty_kill().

* switch mknod_ptmx() to simple_{start,done}_creating().

* instead of storing in pts_fs_info a reference to ptmx dentry, store a reference
to its inode, seeing that this is what we use it for.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/devpts/inode.c