diff options
author | Amir Goldstein <amir73il@gmail.com> | 2020-04-03 07:58:49 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2020-05-13 11:11:24 +0200 |
commit | 3011645b5b061e99cf0f024b3260ec506f91b27c (patch) | |
tree | baeb7c881d624a6950586bfd7eaa4e20a2c66c71 /fs/overlayfs/namei.c | |
parent | b0def88d807f6db6076aab2aeb11f542036e81a6 (diff) | |
download | linux-3011645b5b061e99cf0f024b3260ec506f91b27c.tar.gz linux-3011645b5b061e99cf0f024b3260ec506f91b27c.tar.bz2 linux-3011645b5b061e99cf0f024b3260ec506f91b27c.zip |
ovl: cleanup non-empty directories in ovl_indexdir_cleanup()
Teach ovl_indexdir_cleanup() to remove temp directories containing
whiteouts to prepare for using index dir instead of work dir for removing
merge directories.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/namei.c')
-rw-r--r-- | fs/overlayfs/namei.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c index 0db23baf98e7..723d17744758 100644 --- a/fs/overlayfs/namei.c +++ b/fs/overlayfs/namei.c @@ -484,12 +484,6 @@ struct dentry *ovl_index_upper(struct ovl_fs *ofs, struct dentry *index) return upper; } -/* Is this a leftover from create/whiteout of directory index entry? */ -static bool ovl_is_temp_index(struct dentry *index) -{ - return index->d_name.name[0] == '#'; -} - /* * Verify that an index entry name matches the origin file handle stored in * OVL_XATTR_ORIGIN and that origin file handle can be decoded to lower path. @@ -507,11 +501,6 @@ int ovl_verify_index(struct ovl_fs *ofs, struct dentry *index) if (!d_inode(index)) return 0; - /* Cleanup leftover from index create/cleanup attempt */ - err = -ESTALE; - if (ovl_is_temp_index(index)) - goto fail; - err = -EINVAL; if (index->d_name.len < sizeof(struct ovl_fb)*2) goto fail; |