summaryrefslogtreecommitdiff
path: root/fs/overlayfs/dir.c
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2023-06-17 09:12:50 +0300
committerAmir Goldstein <amir73il@gmail.com>2023-06-19 14:02:00 +0300
commite4599d4b1aeff031d5764b25b37100b4f98148fc (patch)
treef5a64e682830b685f3f19a54f81b7a00e0d3dfe1 /fs/overlayfs/dir.c
parentf723edb8a532cd26e1ff0a2b271d73762d48f762 (diff)
downloadlinux-e4599d4b1aeff031d5764b25b37100b4f98148fc.tar.xz
ovl: negate the ofs->share_whiteout boolean
The default common case is that whiteout sharing is enabled. Change to storing the negated no_shared_whiteout state, so we will not need to initialize it. This is the first step towards removing all config and feature initializations out of ovl_fill_super(). Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Diffstat (limited to 'fs/overlayfs/dir.c')
-rw-r--r--fs/overlayfs/dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c
index 92bdcedfaaec..0da45727099b 100644
--- a/fs/overlayfs/dir.c
+++ b/fs/overlayfs/dir.c
@@ -83,7 +83,7 @@ static struct dentry *ovl_whiteout(struct ovl_fs *ofs)
ofs->whiteout = whiteout;
}
- if (ofs->share_whiteout) {
+ if (!ofs->no_shared_whiteout) {
whiteout = ovl_lookup_temp(ofs, workdir);
if (IS_ERR(whiteout))
goto out;
@@ -95,7 +95,7 @@ static struct dentry *ovl_whiteout(struct ovl_fs *ofs)
if (err != -EMLINK) {
pr_warn("Failed to link whiteout - disabling whiteout inode sharing(nlink=%u, err=%i)\n",
ofs->whiteout->d_inode->i_nlink, err);
- ofs->share_whiteout = false;
+ ofs->no_shared_whiteout = true;
}
dput(whiteout);
}