diff options
author | Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> | 2013-12-18 08:22:41 +0800 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2014-01-06 13:52:53 -0600 |
commit | ab29743117f9f4c22ac44c13c1647fb24fb2bafe (patch) | |
tree | 2c3dde038b7b275cdaad65246f516b7d416b8218 /fs/xfs/xfs_symlink.c | |
parent | 99b6436bc29e4f10e4388c27a3e4810191cc4788 (diff) | |
download | linux-ab29743117f9f4c22ac44c13c1647fb24fb2bafe.tar.bz2 |
xfs: allow linkat() on O_TMPFILE files
The VFS allows an anonymous temporary file to be named at a later
time via a linkat() syscall. The inodes for O_TMPFILE files are
are marked with a special flag I_LINKABLE and have a zero link count.
To support this in XFS, xfs_link() detects if this flag I_LINKABLE
is set and behaves appropriately when detected. So in this case,
its transaciton reservation takes into account the additional
overhead of removing the inode from the unlinked list. Then the
inode is removed from the unlinked list and the directory entry
is added. Finally its link count is bumped accordingly.
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_symlink.c')
0 files changed, 0 insertions, 0 deletions