mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
eCryptfs: Clear i_nlink in rmdir
commit 07850552b9
upstream.
eCryptfs wasn't clearing the eCryptfs inode's i_nlink after a successful
vfs_rmdir() on the lower directory. This resulted in the inode evict and
destroy paths to be missed.
https://bugs.launchpad.net/ecryptfs/+bug/723518
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Signed-off-by: Colin King <colin.king@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
This commit is contained in:
parent
3c153f95d2
commit
8c56853f92
@ -539,6 +539,8 @@ static int ecryptfs_rmdir(struct inode *dir, struct dentry *dentry)
|
||||
dget(lower_dentry);
|
||||
rc = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry);
|
||||
dput(lower_dentry);
|
||||
if (!rc && dentry->d_inode)
|
||||
clear_nlink(dentry->d_inode);
|
||||
fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);
|
||||
dir->i_nlink = lower_dir_dentry->d_inode->i_nlink;
|
||||
unlock_dir(lower_dir_dentry);
|
||||
|
Loading…
Reference in New Issue
Block a user