@@ -875,15 +875,8 @@ int smb2_parse_native_symlink(char **target, const char *buf, unsigned int len,
875875 abs_path += sizeof ("\\DosDevices\\" )- 1 ;
876876 else if (strstarts (abs_path , "\\GLOBAL??\\" ))
877877 abs_path += sizeof ("\\GLOBAL??\\" )- 1 ;
878- else {
879- /* Unhandled absolute symlink, points outside of DOS/Win32 */
880- cifs_dbg (VFS ,
881- "absolute symlink '%s' cannot be converted from NT format "
882- "because points to unknown target\n" ,
883- smb_target );
884- rc = - EIO ;
885- goto out ;
886- }
878+ else
879+ goto out_unhandled_target ;
887880
888881 /* Sometimes path separator after \?? is double backslash */
889882 if (abs_path [0 ] == '\\' )
@@ -910,13 +903,7 @@ int smb2_parse_native_symlink(char **target, const char *buf, unsigned int len,
910903 abs_path ++ ;
911904 abs_path [0 ] = drive_letter ;
912905 } else {
913- /* Unhandled absolute symlink. Report an error. */
914- cifs_dbg (VFS ,
915- "absolute symlink '%s' cannot be converted from NT format "
916- "because points to unknown target\n" ,
917- smb_target );
918- rc = - EIO ;
919- goto out ;
906+ goto out_unhandled_target ;
920907 }
921908
922909 abs_path_len = strlen (abs_path )+ 1 ;
@@ -966,6 +953,7 @@ int smb2_parse_native_symlink(char **target, const char *buf, unsigned int len,
966953 * These paths have same format as Linux symlinks, so no
967954 * conversion is needed.
968955 */
956+ out_unhandled_target :
969957 linux_target = smb_target ;
970958 smb_target = NULL ;
971959 }
0 commit comments