]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ovl: rename is_merge to is_lowest
authorMiklos Szeredi <mszeredi@redhat.com>
Mon, 21 Mar 2016 16:31:46 +0000 (17:31 +0100)
committerShan Hai <shan.hai@oracle.com>
Fri, 4 Aug 2017 05:54:25 +0000 (13:54 +0800)
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>
Orabug: 26401569

(backport upstream commit 56656e960b555cb98bc414382566dcb59aae99a2)

Signed-off-by: Shan Hai <shan.hai@oracle.com>
Reviewed-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
fs/overlayfs/readdir.c

index 861811d1ca592e3a8597333959afca9c9906f4b6..d60897d2d8e8da8a279af96102ea9be3aeabf810 100644 (file)
@@ -37,7 +37,7 @@ struct ovl_dir_cache {
 struct ovl_readdir_data {
        struct dir_context ctx;
        struct dentry *dentry;
-       bool is_merge;
+       bool is_lowest;
        struct rb_root root;
        struct list_head *list;
        struct list_head middle;
@@ -141,9 +141,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;
 
@@ -195,10 +195,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)
@@ -282,7 +282,7 @@ static int ovl_dir_read_merged(struct dentry *dentry, struct list_head *list)
                .dentry = dentry,
                .list = list,
                .root = RB_ROOT,
-               .is_merge = false,
+               .is_lowest = false,
        };
        int idx, next;
 
@@ -299,7 +299,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);
                }