Index: fs/incfs/vfs.c =================================================================== --- a/fs/incfs/vfs.c +++ b/fs/incfs/vfs.c @@ -1865,7 +1865,7 @@ struct dentry *incfs_mount_fs(struct file_system_type goto err; } - - path_put(&backing_dir_path); + mi->mi_backing_dir_path = backing_dir_path; sb->s_flags |= SB_ACTIVE; - pr_debug("incfs: mount\n"); @@ -1915,7 +1915,13 @@ void incfs_kill_sb(struct super_block *sb) struct mount_info *mi = sb->s_fs_info; - pr_debug("incfs: unmount\n"); - generic_shutdown_super(sb); + vfs_rmdir(&init_user_ns, d_inode(mi->mi_backing_dir_path.dentry), + mi->mi_index_dir); + vfs_rmdir(&init_user_ns, d_inode(mi->mi_backing_dir_path.dentry), + mi->mi_incomplete_dir); + path_put(&mi->mi_backing_dir_path); + + kill_anon_super(sb); incfs_free_mount_info(mi); sb->s_fs_info = NULL; }