summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs/namei.c
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2018-03-16 09:39:37 +0100
committerMiklos Szeredi <mszeredi@redhat.com>2018-04-12 12:04:50 +0200
commit12574a9f4c9cc9d8d6fd9078cbb8ec7d3e9ed46b (patch)
treeb402f00c36a27b8ce52059adea6925de10929c35 /fs/overlayfs/namei.c
parentovl: constant st_ino for non-samefs with xino (diff)
downloadlinux-12574a9f4c9cc9d8d6fd9078cbb8ec7d3e9ed46b.tar.xz
linux-12574a9f4c9cc9d8d6fd9078cbb8ec7d3e9ed46b.zip
ovl: consistent i_ino for non-samefs with xino
When overlay layers are not all on the same fs, but all inode numbers of underlying fs do not use the high 'xino' bits, overlay st_ino values are constant and persistent. In that case, set i_ino value to the same value as st_ino for nfsd readdirplus validator. 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.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c
index 52f0b13be633..2dba29eadde6 100644
--- a/fs/overlayfs/namei.c
+++ b/fs/overlayfs/namei.c
@@ -1004,9 +1004,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
upperdentry = dget(index);
if (upperdentry || ctr) {
- if (ctr)
- origin = stack[0].dentry;
- inode = ovl_get_inode(dentry->d_sb, upperdentry, origin, index,
+ inode = ovl_get_inode(dentry->d_sb, upperdentry, stack, index,
ctr);
err = PTR_ERR(inode);
if (IS_ERR(inode))