• Vivek Goyal's avatar
    ovl: during copy up, switch to mounter's creds early · 8eac98b8
    Vivek Goyal authored
    Now, we have the notion that copy up of a file is done with the creds
    of mounter of overlay filesystem (as opposed to task). Right now before
    we switch creds, we do some vfs_getattr() operations in the context of
    task and that itself can fail. We should do that getattr() using the
    creds of mounter instead.
    
    So this patch switches to mounter's creds early during copy up process so
    that even vfs_getattr() is done with mounter's creds.
    
    Do not call revert_creds() unless we have already called
    ovl_override_creds(). [Reported by Arnd Bergmann]
    Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
    8eac98b8
inode.c 10.1 KB