summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2017-09-24 12:01:35 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2017-10-05 15:53:18 +0200
commite0082a0f04c432cb6d7128ef60d8e425e45ce025 (patch)
tree2c9d37e3f7964bc9a80b1e9ce0b8cd1989c942c9 /fs
parentovl: fix may_write_real() for overlayfs directories (diff)
downloadlinux-e0082a0f04c432cb6d7128ef60d8e425e45ce025.tar.xz
linux-e0082a0f04c432cb6d7128ef60d8e425e45ce025.zip
ovl: fix error value printed in ovl_lookup_index()
Fixes: 359f392ca53e ("ovl: lookup index entry for copy up origin") Cc: <stable@vger.kernel.org> # v4.13 Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/overlayfs/namei.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c
index c3addd1114f1..654bea1a5ac9 100644
--- a/fs/overlayfs/namei.c
+++ b/fs/overlayfs/namei.c
@@ -506,6 +506,7 @@ static struct dentry *ovl_lookup_index(struct dentry *dentry,
index = lookup_one_len_unlocked(name.name, ofs->indexdir, name.len);
if (IS_ERR(index)) {
+ err = PTR_ERR(index);
pr_warn_ratelimited("overlayfs: failed inode index lookup (ino=%lu, key=%*s, err=%i);\n"
"overlayfs: mount with '-o index=off' to disable inodes index.\n",
d_inode(origin)->i_ino, name.len, name.name,