Skip to content

Commit 08d8f8a

Browse files
rhvgoyalMiklos Szeredi
authored andcommitted
ovl: Pass ovl_get_nlink() parameters in right order
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 <[email protected]> Acked-by: Amir Goldstein <[email protected]> Fixes: caf70cb ("ovl: cleanup orphan index entries") Cc: <[email protected]> #v4.13 Signed-off-by: Miklos Szeredi <[email protected]>
1 parent 438c84c commit 08d8f8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/overlayfs/namei.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ int ovl_verify_index(struct dentry *index, struct ovl_path *lower,
435435

436436
/* Check if index is orphan and don't warn before cleaning it */
437437
if (d_inode(index)->i_nlink == 1 &&
438-
ovl_get_nlink(index, origin.dentry, 0) == 0)
438+
ovl_get_nlink(origin.dentry, index, 0) == 0)
439439
err = -ENOENT;
440440

441441
dput(origin.dentry);

0 commit comments

Comments
 (0)