aboutsummaryrefslogtreecommitdiffstats
path: root/fs/overlayfs
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2016-03-21 12:31:46 -0400
committerMiklos Szeredi <miklos@szeredi.hu>2016-03-21 12:31:46 -0400
commit56656e960b555cb98bc414382566dcb59aae99a2 (patch)
treec9bc17e46ebaf5fd89cb49fc1b612796c66aa536 /fs/overlayfs
parentf134f2446548267330f45b06f14d59aaf1641fdc (diff)
ovl: rename is_merge to is_lowest
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>
Diffstat (limited to 'fs/overlayfs')
-rw-r--r--fs/overlayfs/readdir.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c
index 18d0a1625220..6ec1e43a9a54 100644
--- a/fs/overlayfs/readdir.c
+++ b/fs/overlayfs/readdir.c
@@ -36,7 +36,7 @@ struct ovl_dir_cache {
36 36
37struct ovl_readdir_data { 37struct ovl_readdir_data {
38 struct dir_context ctx; 38 struct dir_context ctx;
39 bool is_merge; 39 bool is_lowest;
40 struct rb_root root; 40 struct rb_root root;
41 struct list_head *list; 41 struct list_head *list;
42 struct list_head middle; 42 struct list_head middle;
@@ -140,9 +140,9 @@ static int ovl_cache_entry_add_rb(struct ovl_readdir_data *rdd,
140 return 0; 140 return 0;
141} 141}
142 142
143static int ovl_fill_lower(struct ovl_readdir_data *rdd, 143static int ovl_fill_lowest(struct ovl_readdir_data *rdd,
144 const char *name, int namelen, 144 const char *name, int namelen,
145 loff_t offset, u64 ino, unsigned int d_type) 145 loff_t offset, u64 ino, unsigned int d_type)
146{ 146{
147 struct ovl_cache_entry *p; 147 struct ovl_cache_entry *p;
148 148
@@ -194,10 +194,10 @@ static int ovl_fill_merge(struct dir_context *ctx, const char *name,
194 container_of(ctx, struct ovl_readdir_data, ctx); 194 container_of(ctx, struct ovl_readdir_data, ctx);
195 195
196 rdd->count++; 196 rdd->count++;
197 if (!rdd->is_merge) 197 if (!rdd->is_lowest)
198 return ovl_cache_entry_add_rb(rdd, name, namelen, ino, d_type); 198 return ovl_cache_entry_add_rb(rdd, name, namelen, ino, d_type);
199 else 199 else
200 return ovl_fill_lower(rdd, name, namelen, offset, ino, d_type); 200 return ovl_fill_lowest(rdd, name, namelen, offset, ino, d_type);
201} 201}
202 202
203static int ovl_check_whiteouts(struct dentry *dir, struct ovl_readdir_data *rdd) 203static 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)
290 .ctx.actor = ovl_fill_merge, 290 .ctx.actor = ovl_fill_merge,
291 .list = list, 291 .list = list,
292 .root = RB_ROOT, 292 .root = RB_ROOT,
293 .is_merge = false, 293 .is_lowest = false,
294 }; 294 };
295 int idx, next; 295 int idx, next;
296 296
@@ -307,7 +307,7 @@ static int ovl_dir_read_merged(struct dentry *dentry, struct list_head *list)
307 * allows offsets to be reasonably constant 307 * allows offsets to be reasonably constant
308 */ 308 */
309 list_add(&rdd.middle, rdd.list); 309 list_add(&rdd.middle, rdd.list);
310 rdd.is_merge = true; 310 rdd.is_lowest = true;
311 err = ovl_dir_read(&realpath, &rdd); 311 err = ovl_dir_read(&realpath, &rdd);
312 list_del(&rdd.middle); 312 list_del(&rdd.middle);
313 } 313 }