Commit a32a672d authored by Jiri Slaby (SUSE)'s avatar Jiri Slaby (SUSE) Committed by Greg Kroah-Hartman
Browse files

tty: rename and de-inline do_tty_write()



Make do_tty_write()'s name sound similar to iterate_tty_read(). They
both do similar things, so there is no reason for so distinct names. The
new name is therefore iterate_tty_write().

Drop the unnedeed inline modifier too. Let the compiler decide.

Signed-off-by: default avatar"Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230810091510.13006-23-jirislaby@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f47a4fd6
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -961,7 +961,7 @@ int tty_write_lock(struct tty_struct *tty, bool ndelay)
 * Split writes up in sane blocksizes to avoid
 * denial-of-service type attacks
 */
static inline ssize_t do_tty_write(struct tty_ldisc *ld, struct tty_struct *tty,
static ssize_t iterate_tty_write(struct tty_ldisc *ld, struct tty_struct *tty,
				 struct file *file, struct iov_iter *from)
{
	size_t count = iov_iter_count(from);
@@ -1090,7 +1090,7 @@ static ssize_t file_tty_write(struct file *file, struct kiocb *iocb, struct iov_
	if (!ld->ops->write)
		ret = -EIO;
	else
		ret = do_tty_write(ld, tty, file, from);
		ret = iterate_tty_write(ld, tty, file, from);
	tty_ldisc_deref(ld);
	return ret;
}