ovl: Pass ovl_get_nlink() parameters in right order
authorVivek Goyal <vgoyal@redhat.com>
Mon, 27 Nov 2017 15:12:44 +0000 (10:12 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:10:18 +0000 (10:10 +0100)
commit066f40dc495d5ab2ec9a871cb8703d9591d636c5
treec9baadc8aa9db6f196eadf2a5841e34b58ba8ba3
parent4c5ae6a301a5415d1334f6c655bebf91d475bd89
ovl: Pass ovl_get_nlink() parameters in right order

commit 08d8f8a5b094b66b29936e8751b4a818b8db1207 upstream.

Right now we seem to be passing index as "lowerdentry" and origin.dentry
as "upperdentry". IIUC, we should pass these parameters in reversed order
and this looks like a bug.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Amir Goldstein <amir73il@gmail.com>
Fixes: caf70cb2ba5d ("ovl: cleanup orphan index entries")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/overlayfs/namei.c