Skip to content

Commit 0785055

Browse files
author
Tyler Hicks
committed
eCryptfs: Clear i_nlink in rmdir
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> Cc: <stable@kernel.org>
1 parent 61c4f2c commit 0785055

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎fs/ecryptfs/inode.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,8 @@ static int ecryptfs_rmdir(struct inode *dir, struct dentry *dentry)
527527
dget(lower_dentry);
528528
rc = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry);
529529
dput(lower_dentry);
530+
if (!rc && dentry->d_inode)
531+
clear_nlink(dentry->d_inode);
530532
fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);
531533
dir->i_nlink = lower_dir_dentry->d_inode->i_nlink;
532534
unlock_dir(lower_dir_dentry);

0 commit comments

Comments
 (0)