eCryptfs: Invalidate dcache entries when lower i_nlink is zero
authorTyler Hicks <tyhicks@canonical.com>
Wed, 5 Aug 2015 16:26:36 +0000 (11:26 -0500)
committerTyler Hicks <tyhicks@canonical.com>
Tue, 18 Aug 2015 22:29:48 +0000 (17:29 -0500)
commit5556e7e6d30e8e9b5ee51b0e5edd526ee80e5e36
tree58681123e05bcd96b246de427babcfa756acd27e
parent4469942bbbe5ebf845e04971d8c74e9b6178f9fa
eCryptfs: Invalidate dcache entries when lower i_nlink is zero

Consider eCryptfs dcache entries to be stale when the corresponding
lower inode's i_nlink count is zero. This solves a problem caused by the
lower inode being directly modified, without going through the eCryptfs
mount, leaving stale eCryptfs dentries cached and the eCryptfs inode's
i_nlink count not being cleared.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reported-by: Richard Weinberger <richard@nod.at>
Cc: stable@vger.kernel.org
fs/ecryptfs/dentry.c