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>
This commit is contained in:
@@ -84,6 +84,7 @@ extern const struct inode_operations udf_dir_inode_operations;
|
||||
extern const struct file_operations udf_dir_operations;
|
||||
extern const struct inode_operations udf_file_inode_operations;
|
||||
extern const struct file_operations udf_file_operations;
|
||||
extern const struct inode_operations udf_symlink_inode_operations;
|
||||
extern const struct address_space_operations udf_aops;
|
||||
extern const struct address_space_operations udf_adinicb_aops;
|
||||
extern const struct address_space_operations udf_symlink_aops;
|
||||
|
Reference in New Issue
Block a user