stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* request for 4.4-stable: 56656e960b555 ("ovl: rename is_merge to is_lowest")
@ 2018-08-23 11:03 SZ Lin (林上智)
  2018-08-26  6:16 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: SZ Lin (林上智) @ 2018-08-23 11:03 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: stable, Miklos Szeredi, SZ Lin (林上智)

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]

Hi Greg,

This patch is not marked for 4.4-stable, but it's already in 4.9 and 4.14 stable. 

This is a trivial rename patch, but the naming would be more logical and makes 
backports easier.

Please consider to apply this patch to 4.4-stable. 

-- 
SZ Lin (林上智) 

[-- Attachment #2: 0001-ovl-rename-is_merge-to-is_lowest.patch --]
[-- Type: text/x-diff, Size: 2643 bytes --]

>From 8482affefd7351edcf977f398db71ca800e30aea Mon Sep 17 00:00:00 2001
From: Miklos Szeredi <mszeredi@redhat.com>
Date: Mon, 21 Mar 2016 17:31:46 +0100
Subject: [PATCH] ovl: rename is_merge to is_lowest

commit 56656e960b555cb98bc414382566dcb59aae99a2 upstream

The 'is_merge' is an historical naming from when only a single lower layer
could exist.  With the introduction of multiple lower layers the meaning of
this flag was changed to mean only the "lowest layer" (while all lower
layers were being merged).

So now 'is_merge' is inaccurate and hence renaming to 'is_lowest'

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: SZ Lin (林上智) <sz.lin@moxa.com>
---
 fs/overlayfs/readdir.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c
index 0c59955c4653..42f2612bfd98 100644
--- a/fs/overlayfs/readdir.c
+++ b/fs/overlayfs/readdir.c
@@ -36,7 +36,7 @@ struct ovl_dir_cache {
 
 struct ovl_readdir_data {
 	struct dir_context ctx;
-	bool is_merge;
+	bool is_lowest;
 	struct rb_root root;
 	struct list_head *list;
 	struct list_head middle;
@@ -140,9 +140,9 @@ static int ovl_cache_entry_add_rb(struct ovl_readdir_data *rdd,
 	return 0;
 }
 
-static int ovl_fill_lower(struct ovl_readdir_data *rdd,
-			  const char *name, int namelen,
-			  loff_t offset, u64 ino, unsigned int d_type)
+static int ovl_fill_lowest(struct ovl_readdir_data *rdd,
+			   const char *name, int namelen,
+			   loff_t offset, u64 ino, unsigned int d_type)
 {
 	struct ovl_cache_entry *p;
 
@@ -194,10 +194,10 @@ static int ovl_fill_merge(struct dir_context *ctx, const char *name,
 		container_of(ctx, struct ovl_readdir_data, ctx);
 
 	rdd->count++;
-	if (!rdd->is_merge)
+	if (!rdd->is_lowest)
 		return ovl_cache_entry_add_rb(rdd, name, namelen, ino, d_type);
 	else
-		return ovl_fill_lower(rdd, name, namelen, offset, ino, d_type);
+		return ovl_fill_lowest(rdd, name, namelen, offset, ino, d_type);
 }
 
 static int ovl_check_whiteouts(struct dentry *dir, struct ovl_readdir_data *rdd)
@@ -290,7 +290,7 @@ static int ovl_dir_read_merged(struct dentry *dentry, struct list_head *list)
 		.ctx.actor = ovl_fill_merge,
 		.list = list,
 		.root = RB_ROOT,
-		.is_merge = false,
+		.is_lowest = false,
 	};
 	int idx, next;
 
@@ -307,7 +307,7 @@ static int ovl_dir_read_merged(struct dentry *dentry, struct list_head *list)
 			 * allows offsets to be reasonably constant
 			 */
 			list_add(&rdd.middle, rdd.list);
-			rdd.is_merge = true;
+			rdd.is_lowest = true;
 			err = ovl_dir_read(&realpath, &rdd);
 			list_del(&rdd.middle);
 		}
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: request for 4.4-stable: 56656e960b555 ("ovl: rename is_merge to is_lowest")
  2018-08-23 11:03 request for 4.4-stable: 56656e960b555 ("ovl: rename is_merge to is_lowest") SZ Lin (林上智)
@ 2018-08-26  6:16 ` Greg Kroah-Hartman
  2018-08-26 14:47   ` SZ Lin (林上智)
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2018-08-26  6:16 UTC (permalink / raw)
  To: SZ Lin (林上智); +Cc: stable, Miklos Szeredi

On Thu, Aug 23, 2018 at 07:03:16PM +0800, SZ Lin (林上智) wrote:
> Hi Greg,
> 
> This patch is not marked for 4.4-stable, but it's already in 4.9 and 4.14 stable. 
> 
> This is a trivial rename patch, but the naming would be more logical and makes 
> backports easier.

backports of what?  If this isn't needed in the stable tree, I don't
really want to add it.  If some other fix requires it I will be glad to
take it.  But I dont see that here, right?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: request for 4.4-stable: 56656e960b555 ("ovl: rename is_merge to is_lowest")
  2018-08-26  6:16 ` Greg Kroah-Hartman
@ 2018-08-26 14:47   ` SZ Lin (林上智)
  2018-08-26 17:05     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: SZ Lin (林上智) @ 2018-08-26 14:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: stable@vger.kernel.org, Miklos Szeredi

Hi Greg,

<snip>
> 
> backports of what?  If this isn't needed in the stable tree, I don't really want to add it.  If
> some other fix requires it I will be glad to take it.  But I dont see that here, right?

There are two fixes [1][2] in upstream depend on this patch, I plan to send those fixes[1][2] after proper testing in 4.4..

[1] eea2fb4851e9d ("ovl: proper cleanup of workdir")
[2] 415543d5c64fe ("ovl: cleanup bad and stale index entries on mount")

Please consider to apply this patch to 4.4-stable, thanks.
> 
> thanks,
> 
> greg k-h

SZ

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: request for 4.4-stable: 56656e960b555 ("ovl: rename is_merge to is_lowest")
  2018-08-26 14:47   ` SZ Lin (林上智)
@ 2018-08-26 17:05     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2018-08-26 17:05 UTC (permalink / raw)
  To: SZ Lin (林上智); +Cc: stable@vger.kernel.org, Miklos Szeredi

On Sun, Aug 26, 2018 at 02:47:44PM +0000, SZ Lin (林上智) wrote:
> Hi Greg,
> 
> <snip>
> > 
> > backports of what?  If this isn't needed in the stable tree, I don't really want to add it.  If
> > some other fix requires it I will be glad to take it.  But I dont see that here, right?
> 
> There are two fixes [1][2] in upstream depend on this patch, I plan to send those fixes[1][2] after proper testing in 4.4..
> 
> [1] eea2fb4851e9d ("ovl: proper cleanup of workdir")
> [2] 415543d5c64fe ("ovl: cleanup bad and stale index entries on mount")
> 
> Please consider to apply this patch to 4.4-stable, thanks.

Please send all of these as a series so that I _know_ these are all
needed in this order.

Thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-08-26 20:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-23 11:03 request for 4.4-stable: 56656e960b555 ("ovl: rename is_merge to is_lowest") SZ Lin (林上智)
2018-08-26  6:16 ` Greg Kroah-Hartman
2018-08-26 14:47   ` SZ Lin (林上智)
2018-08-26 17:05     ` Greg Kroah-Hartman

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).