diff options
author | Vivek Goyal <vgoyal@redhat.com> | 2018-03-20 16:35:40 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-04-12 12:04:49 +0200 |
commit | 0471a9cdb00ff4a84e781c6dc4b0f87297bac1ed (patch) | |
tree | afb14ab38ef60ab03ba9d69fcb68ab5ed0296467 /fs | |
parent | 102b0d11cbe83e607a8e9060c05930905332f9ec (diff) |
ovl: cleanup setting OVL_INDEX
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/overlayfs/export.c | 3 | ||||
-rw-r--r-- | fs/overlayfs/inode.c | 3 | ||||
-rw-r--r-- | fs/overlayfs/namei.c | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/fs/overlayfs/export.c b/fs/overlayfs/export.c index ed73e363c7b1..bb290cd1e727 100644 --- a/fs/overlayfs/export.c +++ b/fs/overlayfs/export.c @@ -311,9 +311,6 @@ static struct dentry *ovl_obtain_alias(struct super_block *sb, return ERR_CAST(inode); } - if (index) - ovl_set_flag(OVL_INDEX, inode); - dentry = d_find_any_alias(inode); if (!dentry) { dentry = d_alloc_anon(inode->i_sb); diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c index 1d75b2e96c96..b3be0cfd4c92 100644 --- a/fs/overlayfs/inode.c +++ b/fs/overlayfs/inode.c @@ -770,6 +770,9 @@ struct inode *ovl_get_inode(struct super_block *sb, struct dentry *upperdentry, if (upperdentry && ovl_is_impuredir(upperdentry)) ovl_set_flag(OVL_IMPURE, inode); + if (index) + ovl_set_flag(OVL_INDEX, inode); + /* Check for non-merge dir that may have whiteouts */ if (is_dir) { if (((upperdentry && lowerdentry) || numlower > 1) || diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c index 0a26b76590d5..72230b759b58 100644 --- a/fs/overlayfs/namei.c +++ b/fs/overlayfs/namei.c @@ -1007,8 +1007,6 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry, goto out_free_oe; OVL_I(inode)->redirect = upperredirect; - if (index) - ovl_set_flag(OVL_INDEX, inode); } revert_creds(old_cred); |