]> git.baikalelectronics.ru Git - kernel.git/commit
udf: Make stat on symlink report symlink length as st_size
authorJan Kara <jack@suse.cz>
Mon, 2 Jan 2017 13:30:31 +0000 (14:30 +0100)
committerJan Kara <jack@suse.cz>
Thu, 5 Jan 2017 06:52:57 +0000 (07:52 +0100)
commit528c989cb9f75acd54f257c4e416120776215b1d
tree56e6acd3b189c2fa6654ee13d1418616de19c7e8
parentc7d400e8fda60659ca0f24978755ddab3f216f20
udf: Make stat on symlink report symlink length as st_size

UDF encodes symlinks in a more complex fashion and thus i_size of a
symlink does not match the lenght of a string returned by readlink(2).
This confuses some applications (see bug 191241) and may be considered a
violation of POSIX. Fix the problem by reading the link into page cache
in response to stat(2) call and report the length of the decoded path.

Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/inode.c
fs/udf/namei.c
fs/udf/symlink.c
fs/udf/udfdecl.h