os: add some comments and remove an unused variable in rename func
os: add some comments and remove an unused variable in rename func

This slightly clarifies the just-submitted CL 40577.

Updates #19647

Change-Id: I5584ad0e1abbc31796e3e5752351857f2a13d6d7
Reviewed-on: https://go-review.googlesource.com/43625
Run-TryBot: Brad Fitzpatrick <ae9783c0b0efc69cd85ab025ddd17aa44cdc4aa5@golang.org>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>

CAFxX/go,nawawi/go,akutz/go,derekmarcotte/go,derekmarcotte/go,vsekhar/elastic-go,nawawi/go,ImJasonH/go,polyverse-security/go,Cofyc/go,Cofyc/go,codestation/go,josharian/go,CAFxX/go,akutz/go,josharian/go,nawawi/go,CAFxX/go,ImJasonH/go,akutz/go,nawawi/go,golang/go,nawawi/go,josharian/go,golang/go,codestation/go,Cofyc/go,cloudflare/go,golang/go,codestation/go,golang/go,codestation/go,vsekhar/elastic-go,derekmarcotte/go,codestation/go,codestation/go,cloudflare/go,akutz/go,ImJasonH/go,Cofyc/go,ImJasonH/go,CAFxX/go,cloudflare/go,codestation/go,CAFxX/go,cloudflare/go,polyverse-security/go,akutz/go,derekmarcotte/go,Cofyc/go,cloudflare/go,josharian/go,ImJasonH/go,ImJasonH/go,Cofyc/go,vsekhar/elastic-go,derekmarcotte/go,ImJasonH/go,josharian/go,josharian/go,nawawi/go,vsekhar/elastic-go,derekmarcotte/go,ImJasonH/go,vsekhar/elastic-go,CAFxX/go,golang/go,akutz/go,vsekhar/elastic-go,akutz/go,Cofyc/go,cloudflare/go,josharian/go,polyverse-security/go,cloudflare/go,nawawi/go,CAFxX/go,josharian/go,vsekhar/elastic-go,polyverse-security/go,CAFxX/go,cloudflare/go,christopher-henderson/Go,derekmarcotte/go,vsekhar/elastic-go,codestation/go,derekmarcotte/go,polyverse-security/go,polyverse-security/go,golang/go,polyverse-security/go,akutz/go,polyverse-security/go,golang/go,nawawi/go,golang/go,Cofyc/go