• Christian Brauner's avatar
    ovl: use ovl_path_getxattr() wrapper · dad7017a
    Christian Brauner authored
    Add a helper that allows to retrieve ovl xattrs from either lower or
    upper layers. To stop passing mnt and dentry separately everywhere use
    struct path which more accurately reflects the tight coupling between
    mount and dentry in this helper. Swich over all places to pass a path
    argument that can operate on either upper or lower layers. This is
    needed to support idmapped base layers with overlayfs.
    
    Some helpers are always called with an upper dentry, which is now utilized
    by these helpers to create the path.  Make this usage explicit by renaming
    the argument to "upperdentry" and by renaming the function as well in some
    cases.  Also add a check in ovl_do_getxattr() to catch misuse of these
    functions.
    
    Cc: <linux-unionfs@vger.kernel.org>
    Tested-by: default avatarGiuseppe Scrivano <gscrivan@redhat.com>
    Reviewed-by: default avatarAmir Goldstein <amir73il@gmail.com>
    Signed-off-by: default avatarChristian Brauner (Microsoft) <brauner@kernel.org>
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
    dad7017a
copy_up.c 25.2 KB