Jeffrey Mitchell 8aa921a953 xfs: set inode size after creating symlink
When XFS creates a new symlink, it writes its size to disk but not to the
VFS inode. This causes i_size_read() to return 0 for that symlink until
it is re-read from disk, for example when the system is rebooted.

I found this inconsistency while protecting directories with eCryptFS.
The command "stat path/to/symlink/in/ecryptfs" will report "Size: 0" if
the symlink was created after the last reboot on an XFS root.

Call i_size_write() in xfs_symlink()

Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
2021-01-22 16:54:50 -08:00
..
2020-09-06 18:05:51 -07:00
2020-09-15 20:52:41 -07:00
2020-03-02 20:55:55 -08:00
2020-12-16 16:07:34 -08:00
2020-03-11 09:11:39 -07:00
2020-12-18 12:50:18 -08:00
2020-09-15 20:52:42 -07:00
2020-10-07 08:40:29 -07:00
2020-09-15 20:52:39 -07:00
2020-12-16 16:07:34 -08:00
2020-12-16 16:07:34 -08:00
2020-12-16 16:07:34 -08:00
2020-05-08 08:51:34 -07:00