Convert trailing spaces and periods in path components
authorBoris Protopopov <pboris@amazon.com>
Thu, 24 Sep 2020 00:36:38 +0000 (00:36 +0000)
committerSteve French <stfrench@microsoft.com>
Mon, 12 Oct 2020 04:57:18 +0000 (23:57 -0500)
commit57c176074057531b249cf522d90c22313fa74b0b
tree4092d065560292599e1c1079a4092705c4297593
parentbbf5c979011a099af5dc76498918ed7df445635b
Convert trailing spaces and periods in path components

When converting trailing spaces and periods in paths, do so
for every component of the path, not just the last component.
If the conversion is not done for every path component, then
subsequent operations in directories with trailing spaces or
periods (e.g. create(), mkdir()) will fail with ENOENT. This
is because on the server, the directory will have a special
symbol in its name, and the client needs to provide the same.

Signed-off-by: Boris Protopopov <pboris@amazon.com>
Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifs_unicode.c