1
0

051-0001-ovl-rename-is_merge-to-is_lowest.patch 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. From 56656e960b555cb98bc414382566dcb59aae99a2 Mon Sep 17 00:00:00 2001
  2. From: Miklos Szeredi <mszeredi@redhat.com>
  3. Date: Mon, 21 Mar 2016 17:31:46 +0100
  4. Subject: [PATCH] ovl: rename is_merge to is_lowest
  5. The 'is_merge' is an historical naming from when only a single lower layer
  6. could exist. With the introduction of multiple lower layers the meaning of
  7. this flag was changed to mean only the "lowest layer" (while all lower
  8. layers were being merged).
  9. So now 'is_merge' is inaccurate and hence renaming to 'is_lowest'
  10. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
  11. ---
  12. fs/overlayfs/readdir.c | 16 ++++++++--------
  13. 1 file changed, 8 insertions(+), 8 deletions(-)
  14. --- a/fs/overlayfs/readdir.c
  15. +++ b/fs/overlayfs/readdir.c
  16. @@ -36,7 +36,7 @@ struct ovl_dir_cache {
  17. struct ovl_readdir_data {
  18. struct dir_context ctx;
  19. - bool is_merge;
  20. + bool is_lowest;
  21. struct rb_root root;
  22. struct list_head *list;
  23. struct list_head middle;
  24. @@ -139,9 +139,9 @@ static int ovl_cache_entry_add_rb(struct
  25. return 0;
  26. }
  27. -static int ovl_fill_lower(struct ovl_readdir_data *rdd,
  28. - const char *name, int namelen,
  29. - loff_t offset, u64 ino, unsigned int d_type)
  30. +static int ovl_fill_lowest(struct ovl_readdir_data *rdd,
  31. + const char *name, int namelen,
  32. + loff_t offset, u64 ino, unsigned int d_type)
  33. {
  34. struct ovl_cache_entry *p;
  35. @@ -193,10 +193,10 @@ static int ovl_fill_merge(struct dir_con
  36. container_of(ctx, struct ovl_readdir_data, ctx);
  37. rdd->count++;
  38. - if (!rdd->is_merge)
  39. + if (!rdd->is_lowest)
  40. return ovl_cache_entry_add_rb(rdd, name, namelen, ino, d_type);
  41. else
  42. - return ovl_fill_lower(rdd, name, namelen, offset, ino, d_type);
  43. + return ovl_fill_lowest(rdd, name, namelen, offset, ino, d_type);
  44. }
  45. static int ovl_check_whiteouts(struct dentry *dir, struct ovl_readdir_data *rdd)
  46. @@ -289,7 +289,7 @@ static int ovl_dir_read_merged(struct de
  47. .ctx.actor = ovl_fill_merge,
  48. .list = list,
  49. .root = RB_ROOT,
  50. - .is_merge = false,
  51. + .is_lowest = false,
  52. };
  53. int idx, next;
  54. @@ -306,7 +306,7 @@ static int ovl_dir_read_merged(struct de
  55. * allows offsets to be reasonably constant
  56. */
  57. list_add(&rdd.middle, rdd.list);
  58. - rdd.is_merge = true;
  59. + rdd.is_lowest = true;
  60. err = ovl_dir_read(&realpath, &rdd);
  61. list_del(&rdd.middle);
  62. }