1
0
Fork 0

ovl: Pass ovl_get_nlink() parameters in right order

commit 08d8f8a5b0 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: caf70cb2ba ("ovl: cleanup orphan index entries")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
pull/10/head
Vivek Goyal 2017-11-27 10:12:44 -05:00 committed by Greg Kroah-Hartman
parent 4c5ae6a301
commit 066f40dc49
1 changed files with 1 additions and 1 deletions

View File

@ -437,7 +437,7 @@ int ovl_verify_index(struct dentry *index, struct path *lowerstack,
/* Check if index is orphan and don't warn before cleaning it */
if (d_inode(index)->i_nlink == 1 &&
ovl_get_nlink(index, origin.dentry, 0) == 0)
ovl_get_nlink(origin.dentry, index, 0) == 0)
err = -ENOENT;
dput(origin.dentry);