]> git.itanic.dy.fi Git - linux-stable/commit
smb3: Fix root directory when server returns inode number of zero
authorSteve French <stfrench@microsoft.com>
Sat, 31 Mar 2018 23:13:38 +0000 (18:13 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:34:11 +0000 (09:34 +0200)
commitc4bc658f90b8e6614c6d55d211005d9c49b0c317
tree3d2c180f120760065a637fbd4dfae9cc4ff97a26
parentcd93ff92e1d71a2f13447ecc36e17e74bf897ef4
smb3: Fix root directory when server returns inode number of zero

commit 7ea884c77e5c97f1e0a1a422d961d27f78ca2745 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>
fs/cifs/cifsglob.h
fs/cifs/inode.c