diff --git a/mm/shmem.c b/mm/shmem.c index 73f7a9dfcd371c5b4e4c97abab651dd6bfd73da6..1e43c8a865ba76924170f34471f32ad5a3cbdfdb 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1780,6 +1780,7 @@ static int shmem_rmdir(struct inode *dir, struct dentry *dentry) if (!simple_empty(dentry)) return -ENOTEMPTY; + dentry->d_inode->i_nlink--; dir->i_nlink--; return shmem_unlink(dir, dentry); }