smb3: Fix root directory when server returns inode number of zero

commit 7ea884c77e upstream.

Some servers return inode number zero for the root directory, which
causes ls to display incorrect data (missing "." and "..").

If the server returns zero for the inode number of the root directory,
fake an inode number for it.

Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Steve French 2018-03-31 18:13:38 -05:00 • committed by Greg Kroah-Hartman
commit 70dbed63a9
2 changed files with 34 additions and 0 deletions