smb: client: report correct st_size for SMB and NFS symlinks
authorPaulo Alcantara <pc@manguebit.com>
Tue, 28 Nov 2023 19:37:19 +0000 (16:37 -0300)
committerSteve French <stfrench@microsoft.com>
Wed, 29 Nov 2023 02:41:41 +0000 (20:41 -0600)
commit9d63509547a940225d06d7eba1dc412befae255d
tree07b7d7c224d96af4269692fa434882f76fc7502d
parentef22bb800d967616c7638d204bc1b425beac7f5f
smb: client: report correct st_size for SMB and NFS symlinks

We can't rely on FILE_STANDARD_INFORMATION::EndOfFile for reparse
points as they will be always zero.  Set it to symlink target's length
as specified by POSIX.

This will make stat() family of syscalls return the correct st_size
for such files.

Cc: stable@vger.kernel.org
Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/inode.c