packages/net/cgi-io
Jo-Philipp Wich 68aa303efb cgi-io: use O_TMPFILE for uploads and attempt to directly link target file
Create an anonymous inode in /tmp using O_TMPFILE and attempt to link the
file in place using linkat(). Only fall back to the old file copy when
linking the tempfile fails.

Avoids double memory use if both the temporary upload file and the
destination file are located in /tmp.

Ref: https://github.com/openwrt/luci/issues/3654
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4f4a7e9532)
2020-03-04 09:52:49 +01:00
..
src cgi-io: use O_TMPFILE for uploads and attempt to directly link target file 2020-03-04 09:52:49 +01:00
Makefile cgi-io: use O_TMPFILE for uploads and attempt to directly link target file 2020-03-04 09:52:49 +01:00