From a29d61b7f8e88bcc049bb9900edd1582597bdc73 Mon Sep 17 00:00:00 2001 From: Paul Lawrence Date: Fri, 14 Feb 2025 13:06:27 -0800 Subject: [PATCH] Revert "ANDROID: overlayfs: inode_owner_or_capable called during execv" This reverts commit 9b4ff1899e6a1f0a79a0a76f8490498aa55b29d6. The override_creds patches are no longer needed thanks to the work documented in the below bug. Test: adb remount still works Bug: 388912628 Signed-off-by: Paul Lawrence Change-Id: I11eea9e47396e6a4cd1292c57c26276e81233ed1 --- fs/overlayfs/file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index 93469dd5ad42..4444c78e2e0c 100644 --- a/fs/overlayfs/file.c +++ b/fs/overlayfs/file.c @@ -45,8 +45,7 @@ static struct file *ovl_open_realfile(const struct file *file, if (err) { realfile = ERR_PTR(err); } else { - if (old_cred && !inode_owner_or_capable(real_idmap, - realinode)) + if (!inode_owner_or_capable(real_idmap, realinode)) flags &= ~O_NOATIME; realfile = backing_file_open(&file->f_path, flags, realpath,