From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795604586; b=wu3waluG5ya30VHzlcfpG+xynwOJujYKUxSX3uums0YtU62dIPGygjKdwVVbshQ6FgXB veQUJjQN0JVFyfVwWFXR/Zik4xD5gNR+pstzDyZnt6nrh6Pe5eFPa4Yam9JQAtUT2+G9W boOJG6uX3i/bE8ClLzXm6zLy0J1JnD3PEmSfHBlgjVoe/ibv2QZlBwrxNyuJc204LPrsA 25HlmHETbB9lwug0vJeqTugy5M/olYVQ03W3rYKu1bpU5PhiOKULUj58qeaxkH7jw0J3e 6VO8ndqZsD0cuqgjRrb1dimrcwk1vi/L8w3MmWn61j70UFu7P9SRR234Bp6DHS8bPaw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795604586; h=Received:DKIM-Signature:Subject:To:Cc:From:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=AxLJ+KTn+GcUviZK2/GNmJpa9PG14yPCUTJY9OmaaZg=; b=ozcTJEiqJX6FAc+NGS7GEzfuR+oRhq7vCdF6ojCH4uXSN4oKO7Odop36DoUe492M6QDk OV7QXpVPnOPPg8WZZdYry0CDO4jeKPpuXHwqNKOiouZkp7F1XPO6QIs8bTeAHL+roo9Nd g2hm7wM9VPS5/FUFaL4MFDL9ddmVC8dwIKG+8JpauXSFWaDxCNJXx51VquJ38B+Y9j5ix AnqEFivj/nKXIgcqHx07DydS4tE8/MjAM5sEUHpRU+LkyIXxWeR3UtEoC87GFPvjDO0dZ 3nj1bZt9NuV/eBCyJr8S3eohDsBSOzfyJF8ceD4MkpozD2HbSUjBP70HA15WBuOWN/g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=CNcNiXn6; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 766FE606A321 for ; Wed, 25 Nov 2026 11:03:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=CNcNiXn6 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C15921F000E6; Wed, 25 Nov 2026 11:03:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795604586; bh=AxLJ+KTn+GcUviZK2/GNmJpa9PG14yPCUTJY9OmaaZg=; h=Subject:To:Cc:From:Date; b=CNcNiXn6lRwz+liRFoT1spl8UX8I3S31YY7DEeYm1JwUyLoEyUpcXfpeLdx3XdKH3 aPzYVOX8y6aokwPLWzNUpFsOUupPw3++Y/iA10J/JmUN3Y+L3W8HcPK+qu/7v5gALk 4Eir/bBtFejccwfUqV2RjxyTv5XeTRmIZIb/MKoY= Subject: FAILED: patch "[PATCH] ovl: bump the impure dir version when linking a file with" failed to apply to 5.10-stable tree To: daejun7.park@samsung.com,amir73il@gmail.com,sashiko-bot@kernel.org Cc: From: Date: Wed, 25 Nov 2026 11:44:49 +0100 Message-ID: <2026112549-strangely-cardboard-25d9@gregkh> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x 86e2facd8630cc2fdec6ea80c53e370b26b441d9 # git commit -s git send-email --to '' --in-reply-to '2026112549-strangely-cardboard-25d9@gregkh' --subject-prefix 'PATCH 5.10.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 86e2facd8630cc2fdec6ea80c53e370b26b441d9 Mon Sep 17 00:00:00 2001 From: Daejun Park Date: Thu, 12 Nov 2026 12:58:09 +0900 Subject: [PATCH] ovl: bump the impure dir version when linking a file with origin Linking a file with copy up origin into a non-merge impure dir does not bump the dir version. readdir then reuses the impure dir cache built before the link. It reports the upper inode number as d_ino of the new link, not st_ino. Pass whether the linked file has an origin to ovl_dir_modified(), as rename and unlink do. Reported-by: Sashiko Closes: https://sashiko.dev/#/bug/linux-98f207b6-3936-48e9-a40f-88f20be4db7b Fixes: 4edb83bb1041 ("ovl: constant d_ino for non-merge dirs") Cc: stable@vger.kernel.org Signed-off-by: Daejun Park Signed-off-by: Amir Goldstein diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c index e0a164e22d67..8fec18dc5fc7 100644 --- a/fs/overlayfs/dir.c +++ b/fs/overlayfs/dir.c @@ -368,7 +368,7 @@ static bool ovl_type_origin(struct dentry *dentry) } static int ovl_create_upper(struct dentry *dentry, struct inode *inode, - struct ovl_cattr *attr) + struct ovl_cattr *attr, bool origin) { struct ovl_fs *ofs = OVL_FS(dentry->d_sb); struct dentry *upperdir = ovl_dentry_upper(dentry->d_parent); @@ -393,7 +393,7 @@ static int ovl_create_upper(struct dentry *dentry, struct inode *inode, ovl_set_opaque(dentry, newdentry); } - ovl_dir_modified(dentry->d_parent, false); + ovl_dir_modified(dentry->d_parent, origin); err = ovl_instantiate(dentry, inode, newdentry, !!attr->hardlink, NULL); if (err) goto out_cleanup; @@ -491,7 +491,7 @@ static int ovl_set_upper_acl(struct ovl_fs *ofs, struct dentry *upperdentry, } static int ovl_create_over_whiteout(struct dentry *dentry, struct inode *inode, - struct ovl_cattr *cattr) + struct ovl_cattr *cattr, bool origin) { struct ovl_fs *ofs = OVL_FS(dentry->d_sb); struct dentry *workdir = ovl_workdir(dentry); @@ -582,7 +582,7 @@ static int ovl_create_over_whiteout(struct dentry *dentry, struct inode *inode, if (err) goto out_cleanup_unlocked; } - ovl_dir_modified(dentry->d_parent, false); + ovl_dir_modified(dentry->d_parent, origin); err = ovl_instantiate(dentry, inode, newdentry, hardlink, NULL); if (err) { ovl_cleanup(ofs, upperdir, newdentry); @@ -647,12 +647,12 @@ DEFINE_CLASS(ovl_override_creator_creds, static int ovl_create_handle_whiteouts(struct dentry *dentry, struct inode *inode, - struct ovl_cattr *attr) + struct ovl_cattr *attr, bool origin) { if (!ovl_dentry_is_whiteout(dentry)) - return ovl_create_upper(dentry, inode, attr); + return ovl_create_upper(dentry, inode, attr, origin); - return ovl_create_over_whiteout(dentry, inode, attr); + return ovl_create_over_whiteout(dentry, inode, attr, origin); } static int ovl_create_or_link(struct dentry *dentry, struct inode *inode, @@ -687,12 +687,14 @@ static int ovl_create_or_link(struct dentry *dentry, struct inode *inode, */ if (attr->hardlink) - return ovl_create_handle_whiteouts(dentry, inode, attr); + return ovl_create_handle_whiteouts(dentry, inode, attr, + origin); scoped_class(ovl_override_creator_creds, cred, original_creds, dentry, inode, attr->mode) { if (IS_ERR(cred)) return PTR_ERR(cred); - return ovl_create_handle_whiteouts(dentry, inode, attr); + return ovl_create_handle_whiteouts(dentry, inode, attr, + origin); } } return err;