ovl: cleanup temp index entries
authorAmir Goldstein <amir73il@gmail.com>
Wed, 1 Nov 2017 08:13:51 +0000 (10:13 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 24 Jan 2018 10:25:53 +0000 (11:25 +0100)
commit9ee60ce2491166c73a381e5f04dc4c3a147e169d
tree1a4d03cf001582847d7d53149fbe1d9978d00242
parente8f9e5b780b0406ab81add72f1a05583ae5d40ac
ovl: cleanup temp index entries

A previous failed attempt to create or whiteout a directory index may
leave index entries named '#%x' in the index dir. Cleanup those temp
entries on mount instead of failing the mount.

In the future, we may drop 'work' dir and use 'index' dir instead.
This change is enough for cleaning up copy up leftovers 'from the future',
but it is not enough for cleaning up rmdir leftovers 'from the future'
(i.e. temp dir containing whiteouts).

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/namei.c