Okay, as we both seem to agree that it can be mostly used in tablespace symlinks context, so I have changed the name to remove_tablespace_symlink() and moved the function to tablespace.c. S_ISLINK check is used for non-windows code, so not sure adding it here makes any real difference now that we have made it specific to tablespace and we might need to write small port specific code if we want to add S_ISLINK check.
Where is it used? I can't see it called at all in tablespace.c or xlog.c.