Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jan 2017 11:03:20 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r312808 - stable/11/sys/fs/tmpfs
Message-ID:  <201701261103.v0QB3Kih054511@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Jan 26 11:03:19 2017
New Revision: 312808
URL: https://svnweb.freebsd.org/changeset/base/312808

Log:
  MFC r312425:
  Make tmpfs directory cursor available outside tmpfs_subr.c.

Modified:
  stable/11/sys/fs/tmpfs/tmpfs.h
  stable/11/sys/fs/tmpfs/tmpfs_subr.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/fs/tmpfs/tmpfs.h
==============================================================================
--- stable/11/sys/fs/tmpfs/tmpfs.h	Thu Jan 26 11:00:57 2017	(r312807)
+++ stable/11/sys/fs/tmpfs/tmpfs.h	Thu Jan 26 11:03:19 2017	(r312808)
@@ -392,6 +392,11 @@ struct tmpfs_fid {
 	unsigned long		tf_gen;
 };
 
+struct tmpfs_dir_cursor {
+	struct tmpfs_dirent	*tdc_current;
+	struct tmpfs_dirent	*tdc_tree;
+};
+
 #ifdef _KERNEL
 /*
  * Prototypes for tmpfs_subr.c.
@@ -436,6 +441,10 @@ void	tmpfs_itimes(struct vnode *, const 
 void	tmpfs_set_status(struct tmpfs_node *node, int status);
 void	tmpfs_update(struct vnode *);
 int	tmpfs_truncate(struct vnode *, off_t);
+struct tmpfs_dirent *tmpfs_dir_first(struct tmpfs_node *dnode,
+	    struct tmpfs_dir_cursor *dc);
+struct tmpfs_dirent *tmpfs_dir_next(struct tmpfs_node *dnode,
+	    struct tmpfs_dir_cursor *dc);
 
 /*
  * Convenience macros to simplify some logical expressions.

Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c
==============================================================================
--- stable/11/sys/fs/tmpfs/tmpfs_subr.c	Thu Jan 26 11:00:57 2017	(r312807)
+++ stable/11/sys/fs/tmpfs/tmpfs_subr.c	Thu Jan 26 11:03:19 2017	(r312808)
@@ -62,11 +62,6 @@ __FBSDID("$FreeBSD$");
 #include <fs/tmpfs/tmpfs_fifoops.h>
 #include <fs/tmpfs/tmpfs_vnops.h>
 
-struct tmpfs_dir_cursor {
-	struct tmpfs_dirent	*tdc_current;
-	struct tmpfs_dirent	*tdc_tree;
-};
-
 SYSCTL_NODE(_vfs, OID_AUTO, tmpfs, CTLFLAG_RW, 0, "tmpfs file system");
 
 static long tmpfs_pages_reserved = TMPFS_PAGES_MINRESERVED;
@@ -725,7 +720,7 @@ tmpfs_alloc_file(struct vnode *dvp, stru
 	return (0);
 }
 
-static struct tmpfs_dirent *
+struct tmpfs_dirent *
 tmpfs_dir_first(struct tmpfs_node *dnode, struct tmpfs_dir_cursor *dc)
 {
 	struct tmpfs_dirent *de;
@@ -739,7 +734,7 @@ tmpfs_dir_first(struct tmpfs_node *dnode
 	return (dc->tdc_current);
 }
 
-static struct tmpfs_dirent *
+struct tmpfs_dirent *
 tmpfs_dir_next(struct tmpfs_node *dnode, struct tmpfs_dir_cursor *dc)
 {
 	struct tmpfs_dirent *de;



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