diff options
author | Amir Goldstein <amir73il@gmail.com> | 2017-11-08 18:23:36 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-01-24 10:19:25 +0100 |
commit | d583ed7d138825fd9469d5419e23230ad39173e8 (patch) | |
tree | 2da4bca9cba146bedead26fff6355b987a44b858 /fs/overlayfs/super.c | |
parent | ovl: force r/o mount when index dir creation fails (diff) | |
download | linux-d583ed7d138825fd9469d5419e23230ad39173e8.tar.xz linux-d583ed7d138825fd9469d5419e23230ad39173e8.zip |
ovl: store layer index in ovl_layer
Store the fs root layer index inside ovl_layer struct, so we can
get the root fs layer index from merge dir lower layer instead of
find it with ovl_find_layer() helper.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/super.c')
-rw-r--r-- | fs/overlayfs/super.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 9aa5d32af427..b34a002ab4b5 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -1106,6 +1106,7 @@ static int ovl_get_lower_layers(struct ovl_fs *ofs, struct path *stack, ofs->lower_layers[ofs->numlower].mnt = mnt; ofs->lower_layers[ofs->numlower].pseudo_dev = dev; + ofs->lower_layers[ofs->numlower].idx = i + 1; ofs->numlower++; /* Check if all lower layers are on same sb */ |