Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Jun 2018 11:42:09 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r334483 - in head/sys/compat/linuxkpi/common: include/linux src
Message-ID:  <201806011142.w51Bg90u066026@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Fri Jun  1 11:42:09 2018
New Revision: 334483
URL: https://svnweb.freebsd.org/changeset/base/334483

Log:
  Implement radix_tree_iter_delete() in the LinuxKPI.
  
  Submitted by:	Johannes Lundberg <johalun0@gmail.com>
  MFC after:	1 week
  Sponsored by:	Mellanox Technologies
  Sponsored by:	Limelight Networks

Modified:
  head/sys/compat/linuxkpi/common/include/linux/radix-tree.h
  head/sys/compat/linuxkpi/common/src/linux_radix.c

Modified: head/sys/compat/linuxkpi/common/include/linux/radix-tree.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/radix-tree.h	Fri Jun  1 11:33:14 2018	(r334482)
+++ head/sys/compat/linuxkpi/common/include/linux/radix-tree.h	Fri Jun  1 11:42:09 2018	(r334483)
@@ -79,5 +79,6 @@ void	*radix_tree_lookup(struct radix_tree_root *, unsi
 void	*radix_tree_delete(struct radix_tree_root *, unsigned long);
 int	radix_tree_insert(struct radix_tree_root *, unsigned long, void *);
 bool	radix_tree_iter_find(struct radix_tree_root *, struct radix_tree_iter *, void ***);
+void	radix_tree_iter_delete(struct radix_tree_root *, struct radix_tree_iter *, void **);
 
 #endif	/* _LINUX_RADIX_TREE_H_ */

Modified: head/sys/compat/linuxkpi/common/src/linux_radix.c
==============================================================================
--- head/sys/compat/linuxkpi/common/src/linux_radix.c	Fri Jun  1 11:33:14 2018	(r334482)
+++ head/sys/compat/linuxkpi/common/src/linux_radix.c	Fri Jun  1 11:42:09 2018	(r334483)
@@ -162,6 +162,13 @@ out:
 	return (item);
 }
 
+void
+radix_tree_iter_delete(struct radix_tree_root *root,
+    struct radix_tree_iter *iter, void **slot)
+{
+	radix_tree_delete(root, iter->index);
+}
+
 int
 radix_tree_insert(struct radix_tree_root *root, unsigned long index, void *item)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806011142.w51Bg90u066026>