* FAILED: patch "[PATCH] ovl: set lower layer st_dev only if setting lower st_ino" failed to apply to 4.15-stable tree
@ 2018-04-17 12:32 gregkh
2018-04-17 15:02 ` Amir Goldstein
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2018-04-17 12:32 UTC (permalink / raw)
To: amir73il, mszeredi, stable; +Cc: stable
The patch below does not apply to the 4.15-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 <stable@vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 9f99e50d460ac7fd5f6c9b97aad0088c28c8656d Mon Sep 17 00:00:00 2001
From: Amir Goldstein <amir73il@gmail.com>
Date: Wed, 11 Apr 2018 20:09:29 +0300
Subject: [PATCH] ovl: set lower layer st_dev only if setting lower st_ino
For broken hardlinks, we do not return lower st_ino, so we should
also not return lower pseudo st_dev.
Fixes: a0c5ad307ac0 ("ovl: relax same fs constraint for constant st_ino")
Cc: <stable@vger.kernel.org> #v4.15
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index 4689716f23d8..1d75b2e96c96 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -118,13 +118,10 @@ int ovl_getattr(const struct path *path, struct kstat *stat,
*/
if (ovl_test_flag(OVL_INDEX, d_inode(dentry)) ||
(!ovl_verify_lower(dentry->d_sb) &&
- (is_dir || lowerstat.nlink == 1)))
+ (is_dir || lowerstat.nlink == 1))) {
stat->ino = lowerstat.ino;
-
- if (samefs)
- WARN_ON_ONCE(stat->dev != lowerstat.dev);
- else
stat->dev = ovl_get_pseudo_dev(dentry);
+ }
}
if (samefs) {
/*
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: FAILED: patch "[PATCH] ovl: set lower layer st_dev only if setting lower st_ino" failed to apply to 4.15-stable tree
2018-04-17 12:32 FAILED: patch "[PATCH] ovl: set lower layer st_dev only if setting lower st_ino" failed to apply to 4.15-stable tree gregkh
@ 2018-04-17 15:02 ` Amir Goldstein
2018-04-17 15:10 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Amir Goldstein @ 2018-04-17 15:02 UTC (permalink / raw)
To: Greg KH; +Cc: Miklos Szeredi, stable
[-- Attachment #1: Type: text/plain, Size: 353 bytes --]
On Tue, Apr 17, 2018 at 3:32 PM, <gregkh@linuxfoundation.org> wrote:
>
> The patch below does not apply to the 4.15-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 <stable@vger.kernel.org>.
>
Do you take attachments?
Thanks,
Amir.
[-- Attachment #2: 0001-ovl-set-lower-layer-st_dev-only-if-setting-lower-st_-v4.15.patch --]
[-- Type: text/x-patch, Size: 1375 bytes --]
From 1d43335c9a9c2bedcb4b23011f39cabd26ad9ed3 Mon Sep 17 00:00:00 2001
From: Amir Goldstein <amir73il@gmail.com>
Date: Wed, 11 Apr 2018 20:09:29 +0300
Subject: [PATCH] ovl: set lower layer st_dev only if setting lower st_ino
[ Upstream commit 9f99e50d460ac7fd5f6c9b97aad0088c28c8656d ]
For broken hardlinks, we do not return lower st_ino, so we should
also not return lower pseudo st_dev.
Fixes: a0c5ad307ac0 ("ovl: relax same fs constraint for constant st_ino")
Cc: <stable@vger.kernel.org> #v4.15
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
fs/overlayfs/inode.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index 94d2f8a8b779..0dbbfedef54c 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -110,13 +110,10 @@ int ovl_getattr(const struct path *path, struct kstat *stat,
* that the upper hardlink is not broken.
*/
if (is_dir || lowerstat.nlink == 1 ||
- ovl_test_flag(OVL_INDEX, d_inode(dentry)))
+ ovl_test_flag(OVL_INDEX, d_inode(dentry))) {
stat->ino = lowerstat.ino;
-
- if (samefs)
- WARN_ON_ONCE(stat->dev != lowerstat.dev);
- else
stat->dev = ovl_get_pseudo_dev(dentry);
+ }
}
if (samefs) {
/*
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: FAILED: patch "[PATCH] ovl: set lower layer st_dev only if setting lower st_ino" failed to apply to 4.15-stable tree
2018-04-17 15:02 ` Amir Goldstein
@ 2018-04-17 15:10 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2018-04-17 15:10 UTC (permalink / raw)
To: Amir Goldstein; +Cc: Miklos Szeredi, stable
On Tue, Apr 17, 2018 at 06:02:35PM +0300, Amir Goldstein wrote:
> On Tue, Apr 17, 2018 at 3:32 PM, <gregkh@linuxfoundation.org> wrote:
> >
> > The patch below does not apply to the 4.15-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 <stable@vger.kernel.org>.
> >
>
> Do you take attachments?
Yup! Thanks for this, now queued up.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-17 15:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-17 12:32 FAILED: patch "[PATCH] ovl: set lower layer st_dev only if setting lower st_ino" failed to apply to 4.15-stable tree gregkh
2018-04-17 15:02 ` Amir Goldstein
2018-04-17 15:10 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).