diff options
author | Amir Goldstein <amir73il@gmail.com> | 2023-04-27 12:21:46 +0300 |
---|---|---|
committer | Amir Goldstein <amir73il@gmail.com> | 2023-06-19 14:01:14 +0300 |
commit | 2b21da920866ad20b5e3119f3b8d2267774b7b0a (patch) | |
tree | 93b2c8fd6d67615cabfef1de618ec9bc73343c22 /fs/overlayfs/super.c | |
parent | 5436ab0a864e8bb263919e51c26395a67bde17ca (diff) |
ovl: prepare to store lowerdata redirect for lazy lowerdata lookup
Prepare to allow ovl_lookup() to leave the last entry in a non-dir
lowerstack empty to signify lazy lowerdata lookup.
In this case, ovl_lookup() stores the redirect path from metacopy to
lowerdata in ovl_inode, which is going to be used later to perform the
lazy lowerdata lookup.
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 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index be2bdf37b0d5..9de02ca2387e 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -171,6 +171,7 @@ static struct inode *ovl_alloc_inode(struct super_block *sb) oi->version = 0; oi->flags = 0; oi->__upperdentry = NULL; + oi->lowerdata_redirect = NULL; oi->oe = NULL; mutex_init(&oi->lock); @@ -194,6 +195,8 @@ static void ovl_destroy_inode(struct inode *inode) ovl_free_entry(oi->oe); if (S_ISDIR(inode->i_mode)) ovl_dir_cache_free(inode); + else + kfree(oi->lowerdata_redirect); } static void ovl_free_fs(struct ovl_fs *ofs) |