]> git.baikalelectronics.ru Git - kernel.git/commit
ovl: check lower existence of rename target
authorMiklos Szeredi <mszeredi@redhat.com>
Fri, 16 Dec 2016 10:02:55 +0000 (11:02 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 16 Dec 2016 10:02:55 +0000 (11:02 +0100)
commited12cac3137c4dd847d94514472e83d22b73bae3
tree1b5173c39a66443e5665efaf82e7fe1b4c40119e
parent1e67a79ad00fe4aebc3cbbe2c76dc1daa7b3d578
ovl: check lower existence of rename target

Check if something exists on the lower layer(s) under the target or rename
to decide if directory needs to be marked "opaque".

Marking opaque is done before the rename, and on failure the marking was
undone.  Also the opaque xattr was removed if the target didn't cover
anything.

This patch changes behavior so that removal of "opaque" is not done in
either of the above cases.  This means that directory may have the opaque
flag even if it doesn't cover anything.  However this shouldn't affect the
performance or semantics of the overalay, while simplifying the code.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/dir.c