summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs/ovl_entry.h
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2023-11-19 20:55:00 +0200
committerAmir Goldstein <amir73il@gmail.com>2023-11-20 09:49:09 +0200
commit02d70090e0e020eff440dbe51e93fe2fc94d9835 (patch)
treeadd479ba3fd8b3c9010654e24d8ae929660b2516 /fs/overlayfs/ovl_entry.h
parent98b1cc82c4affc16f5598d4fa14b1858671b2263 (diff)
downloadlinux-02d70090e0e020eff440dbe51e93fe2fc94d9835.tar.gz
linux-02d70090e0e020eff440dbe51e93fe2fc94d9835.tar.bz2
linux-02d70090e0e020eff440dbe51e93fe2fc94d9835.zip
ovl: remove redundant ofs->indexdir member
When the index feature is disabled, ofs->indexdir is NULL. When the index feature is enabled, ofs->indexdir has the same value as ofs->workdir and takes an extra reference. This makes the code harder to understand when it is not always clear that ofs->indexdir in one function is the same dentry as ofs->workdir in another function. Remove this redundancy, by referencing ofs->workdir directly in index helpers and by using the ovl_indexdir() accessor in generic code. Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Diffstat (limited to 'fs/overlayfs/ovl_entry.h')
-rw-r--r--fs/overlayfs/ovl_entry.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/overlayfs/ovl_entry.h b/fs/overlayfs/ovl_entry.h
index d82d2a043da2..5fa9c58af65f 100644
--- a/fs/overlayfs/ovl_entry.h
+++ b/fs/overlayfs/ovl_entry.h
@@ -63,10 +63,8 @@ struct ovl_fs {
struct ovl_sb *fs;
/* workbasedir is the path at workdir= mount option */
struct dentry *workbasedir;
- /* workdir is the 'work' directory under workbasedir */
+ /* workdir is the 'work' or 'index' directory under workbasedir */
struct dentry *workdir;
- /* index directory listing overlay inodes by origin file handle */
- struct dentry *indexdir;
long namelen;
/* pathnames of lower and upper dirs, for show_options */
struct ovl_config config;
@@ -81,7 +79,6 @@ struct ovl_fs {
/* Traps in ovl inode cache */
struct inode *workbasedir_trap;
struct inode *workdir_trap;
- struct inode *indexdir_trap;
/* -1: disabled, 0: same fs, 1..32: number of unused ino bits */
int xino_mode;
/* For allocation of non-persistent inode numbers */