summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs/util.c
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2019-11-19 14:31:46 +0100
committerMiklos Szeredi <mszeredi@redhat.com>2020-03-17 15:04:22 +0100
commit62c832ed4e1b67cc65d909005aae5ce7031a2b38 (patch)
treef9a7a2103b79c4068be7a3f878d1f8d264d40a98 /fs/overlayfs/util.c
parentovl: factor out helper ovl_get_root() (diff)
downloadlinux-62c832ed4e1b67cc65d909005aae5ce7031a2b38.tar.xz
linux-62c832ed4e1b67cc65d909005aae5ce7031a2b38.zip
ovl: simplify i_ino initialization
Move i_ino initialization to ovl_inode_init() to avoid the dance of setting i_ino in ovl_fill_inode() sometimes on the first call and sometimes on the seconds call. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/util.c')
-rw-r--r--fs/overlayfs/util.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c
index 6584e5800a59..f318e4811e32 100644
--- a/fs/overlayfs/util.c
+++ b/fs/overlayfs/util.c
@@ -386,24 +386,6 @@ void ovl_dentry_set_redirect(struct dentry *dentry, const char *redirect)
oi->redirect = redirect;
}
-void ovl_inode_init(struct inode *inode, struct dentry *upperdentry,
- struct dentry *lowerdentry, struct dentry *lowerdata)
-{
- struct inode *realinode = d_inode(upperdentry ?: lowerdentry);
-
- if (upperdentry)
- OVL_I(inode)->__upperdentry = upperdentry;
- if (lowerdentry)
- OVL_I(inode)->lower = igrab(d_inode(lowerdentry));
- if (lowerdata)
- OVL_I(inode)->lowerdata = igrab(d_inode(lowerdata));
-
- ovl_copyattr(realinode, inode);
- ovl_copyflags(realinode, inode);
- if (!inode->i_ino)
- inode->i_ino = realinode->i_ino;
-}
-
void ovl_inode_update(struct inode *inode, struct dentry *upperdentry)
{
struct inode *upperinode = d_inode(upperdentry);