ovl: whiteout index when union nlink drops to zero
authorAmir Goldstein <amir73il@gmail.com>
Tue, 24 Oct 2017 14:38:33 +0000 (17:38 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 24 Jan 2018 10:25:56 +0000 (11:25 +0100)
commite7dd0e71348c1e3bc4b9d767c1ffbcbdee46a726
treedcba3e99e1d07da04c4f9cfec83715c4b0d169ea
parent89a17556ce4d113f6e7896e118a14f79a84484e9
ovl: whiteout index when union nlink drops to zero

With NFS export feature enabled, when overlay inode nlink drops to
zero, instead of removing the index entry, replace it with a whiteout
index entry.

This is needed for NFS export in order to prevent future open by handle
from opening the lower file directly.

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