• Amir Goldstein's avatar
    ovl: fix value of i_ino for lower hardlink corner case · 300b124f
    Amir Goldstein authored
    Commit 6dde1e42 ("ovl: make i_ino consistent with st_ino in more
    cases"), relaxed the condition nfs_export=on in order to set the value of
    i_ino to xino map of real ino.
    
    Specifically, it also relaxed the pre-condition that index=on for
    consistent i_ino. This opened the corner case of lower hardlink in
    ovl_get_inode(), which calls ovl_fill_inode() with ino=0 and then
    ovl_init_inode() is called to set i_ino to lower real ino without the xino
    mapping.
    
    Pass the correct values of ino;fsid in this case to ovl_fill_inode(), so it
    can initialize i_ino correctly.
    
    Fixes: 6dde1e42 ("ovl: make i_ino consistent with st_ino in more ...")
    Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
    300b124f
inode.c 26 KB