OSDN Git Service

allow the temp files created by open() to be linked to
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 11 Jun 2013 04:34:36 +0000 (08:34 +0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 29 Jun 2013 08:57:11 +0000 (12:57 +0400)
commitf4e0c30c191f87851c4a53454abb55ee276f4a7e
tree8bdb4f81dea303f93f1d646034653c8af3fba323
parent60545d0d4610b02e55f65d141c95b18ccf855b6e
allow the temp files created by open() to be linked to

O_TMPFILE | O_CREAT => linkat() with AT_SYMLINK_FOLLOW and /proc/self/fd/<n>
as oldpath (i.e. flink()) will create a link
O_TMPFILE | O_CREAT | O_EXCL => ENOENT on attempt to link those guys

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