]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ovl: remove redundant ofs->indexdir member
authorAmir Goldstein <amir73il@gmail.com>
Sun, 19 Nov 2023 18:55:00 +0000 (20:55 +0200)
committerAmir Goldstein <amir73il@gmail.com>
Mon, 20 Nov 2023 07:49:09 +0000 (09:49 +0200)
commit02d70090e0e020eff440dbe51e93fe2fc94d9835
treeadd479ba3fd8b3c9010654e24d8ae929660b2516
parent98b1cc82c4affc16f5598d4fa14b1858671b2263
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>
fs/overlayfs/export.c
fs/overlayfs/namei.c
fs/overlayfs/ovl_entry.h
fs/overlayfs/params.c
fs/overlayfs/readdir.c
fs/overlayfs/super.c
fs/overlayfs/util.c