]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
Revert "UBUNTU: SAUCE: ovl: Restore vm_file value when lower fs mmap fails"
authorKamal Mostafa <kamal@canonical.com>
Thu, 6 May 2021 17:47:23 +0000 (10:47 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 May 2021 07:54:09 +0000 (09:54 +0200)
BugLink: https://bugs.launchpad.net/bugs/1927535
This reverts commit b5250ec62f72950ca9a4d3149fe689495e586124.

To be replaced by the v5.11.17 stable backport of:
2896900e22f8 "ovl: fix reference counting in ovl_mmap error path"

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
fs/overlayfs/file.c

index 5282bf6bdd6e667b578bec3cd9aae9b30e628870..f04948931889b3c360268ac08d07d7500fe9912d 100644 (file)
@@ -439,11 +439,7 @@ static int ovl_mmap(struct file *file, struct vm_area_struct *vma)
        revert_creds(old_cred);
 
        if (ret) {
-               /*
-                * Drop reference count from new vm_file value and restore
-                * original vm_file value
-                */
-               vma->vm_file = file;
+               /* Drop reference count from new vm_file value */
                fput(realfile);
        } else {
                /* Drop reference count from previous vm_file value */