diff options
author | Vivek Goyal <vgoyal@redhat.com> | 2018-05-11 18:49:30 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-20 10:56:11 +0300 |
commit | 2664bd0897c2889258472a1ee922ef9d4c5fa58f (patch) | |
tree | 4451f757dc52c00751c3158c24dc1bb004a6bc59 /fs/overlayfs/inode.c | |
parent | 67d756c27ac4f4576dee313579724bd8711bc75e (diff) | |
download | linux-2664bd0897c2889258472a1ee922ef9d4c5fa58f.tar.xz |
ovl: Store lower data inode in ovl_inode
Right now ovl_inode stores inode pointer for lower inode. This helps with
quickly getting lower inode given overlay inode (ovl_inode_lower()).
Now with metadata only copy-up, we can have metacopy inode in middle layer
as well and inode containing data can be different from ->lower. I need to
be able to open the real file in ovl_open_realfile() and for that I need to
quickly find the lower data inode.
Hence store lower data inode also in ovl_inode. Also provide an helper
ovl_inode_lowerdata() to access this field.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/inode.c')
-rw-r--r-- | fs/overlayfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c index 2a5a38c81961..12553274eae7 100644 --- a/fs/overlayfs/inode.c +++ b/fs/overlayfs/inode.c @@ -864,7 +864,7 @@ struct inode *ovl_get_inode(struct super_block *sb, } } ovl_fill_inode(inode, realinode->i_mode, realinode->i_rdev, ino, fsid); - ovl_inode_init(inode, upperdentry, lowerdentry); + ovl_inode_init(inode, upperdentry, lowerdentry, oip->lowerdata); if (upperdentry && ovl_is_impuredir(upperdentry)) ovl_set_flag(OVL_IMPURE, inode); |