summaryrefslogtreecommitdiff
path: root/fs/open.c
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2017-10-12 19:03:04 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2017-10-24 16:06:16 +0200
commit6eaf011144af10cad34c0d46f82e50d382c8e926 (patch)
tree1b4e2491fe0a90dd60bad88c1bfa14b488cf6677 /fs/open.c
parent0ce5cdc9d79277e55c3d80bf7d2b1adea2752078 (diff)
downloadlwn-6eaf011144af10cad34c0d46f82e50d382c8e926.tar.gz
lwn-6eaf011144af10cad34c0d46f82e50d382c8e926.zip
ovl: fix EIO from lookup of non-indexed upper
Commit fbaf94ee3cd5 ("ovl: don't set origin on broken lower hardlink") attempt to avoid the condition of non-indexed upper inode with lower hardlink as origin. If this condition is found, lookup returns EIO. The protection of commit mentioned above does not cover the case of lower that is not a hardlink when it is copied up (with either index=off/on) and then lower is hardlinked while overlay is offline. Changes to lower layer while overlayfs is offline should not result in unexpected behavior, so a permanent EIO error after creating a link in lower layer should not be considered as correct behavior. This fix replaces EIO error with success in cases where upper has origin but no index is found, or index is found that does not match upper inode. In those cases, lookup will not fail and the returned overlay inode will be hashed by upper inode instead of by lower origin inode. 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/open.c')
0 files changed, 0 insertions, 0 deletions