• Amir Goldstein's avatar
    ovl: untangle copy up call chain · b10cdcdc
    Amir Goldstein authored
    In an attempt to dedup ~100 LOC, we ended up creating a tangled call chain,
    whose branches merge and diverge in several points according to the
    immutable c->tmpfile copy up mode.
    
    This call chain was hard to analyse for locking correctness because the
    locking requirements for the c->tmpfile flow were very different from the
    locking requirements for the !c->tmpfile flow (i.e. directory vs.  regulare
    file copy up).
    
    Split the copy up helpers of the c->tmpfile flow from those of the
    !c->tmpfile (i.e. workdir) flow and remove the c->tmpfile mode from copy up
    context.
    Suggested-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
    b10cdcdc
copy_up.c 20.8 KB