summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs/util.c
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2018-01-11 13:01:08 +0100
committerMiklos Szeredi <mszeredi@redhat.com>2018-01-24 11:25:55 +0100
commit016b720f5558d825bc0a4c6d2bdd6929fbe86536 (patch)
treeb6299145104cd5346218677cdb169faf2f4aee40 /fs/overlayfs/util.c
parentovl: index all non-dir on copy up for NFS export (diff)
downloadlinux-016b720f5558d825bc0a4c6d2bdd6929fbe86536.tar.xz
linux-016b720f5558d825bc0a4c6d2bdd6929fbe86536.zip
ovl: index directories on copy up for NFS export
With the NFS export feature enabled, all dirs are indexed on copy up. Non-dir files are copied up directly to indexdir and then hardlinked to upper dir. Directories are copied up to indexdir, then an index entry is created in indexdir with 'upper' xattr pointing to the copied up dir and then the copied up dir is moved to upper dir. Directory index is also used for consistency verification, like detecting multiple redirected dirs to the same lower dir on lookup. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/util.c')
-rw-r--r--fs/overlayfs/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c
index 7cb930e367be..71ddc4f8864e 100644
--- a/fs/overlayfs/util.c
+++ b/fs/overlayfs/util.c
@@ -474,7 +474,7 @@ bool ovl_need_index(struct dentry *dentry)
return false;
/* Index all files for NFS export and consistency verification */
- if (!d_is_dir(lower) && ovl_index_all(dentry->d_sb))
+ if (ovl_index_all(dentry->d_sb))
return true;
/* Index only lower hardlinks on copy up */