diff mbox series

[03/11] NFS: Move nfs_readdir_descriptor_t into internal header

Message ID 1604325011-29427-4-git-send-email-dwysocha@redhat.com (mailing list archive)
State New, archived
Headers show
Series Add NFS readdir tracepoints and improve performance of reading directories | expand

Commit Message

David Wysochanski Nov. 2, 2020, 1:50 p.m. UTC
In preparation for readdir tracing involving nfs_readdir_descriptor_t
move the definition into the "internal.h" header file, and ensure
internal.h is included before nfstrace.h to avoid build problems.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
---
 fs/nfs/dir.c      | 18 ------------------
 fs/nfs/internal.h | 18 ++++++++++++++++++
 fs/nfs/nfs3xdr.c  |  2 +-
 3 files changed, 19 insertions(+), 19 deletions(-)
diff mbox series

Patch

diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 116493e66922..145393188f6a 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -144,24 +144,6 @@  struct nfs_cache_array {
 	struct nfs_cache_array_entry array[];
 };
 
-typedef struct {
-	struct file	*file;
-	struct page	*page;
-	struct dir_context *ctx;
-	unsigned long	page_index;
-	u64		*dir_cookie;
-	u64		last_cookie;
-	loff_t		current_index;
-	loff_t		prev_index;
-
-	unsigned long	dir_verifier;
-	unsigned long	timestamp;
-	unsigned long	gencount;
-	unsigned int	cache_entry_index;
-	bool plus;
-	bool eof;
-} nfs_readdir_descriptor_t;
-
 static
 void nfs_readdir_init_array(struct page *page)
 {
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 6673a77884d9..68ade987370d 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -62,6 +62,24 @@  static inline bool nfs_lookup_is_soft_revalidate(const struct dentry *dentry)
  */
 #define NFS_MAX_READDIR_PAGES 8
 
+typedef struct {
+	struct file	*file;
+	struct page	*page;
+	struct dir_context *ctx;
+	unsigned long	page_index;
+	u64		*dir_cookie;
+	u64		last_cookie;
+	loff_t		current_index;
+	loff_t		prev_index;
+
+	unsigned long	dir_verifier;
+	unsigned long	timestamp;
+	unsigned long	gencount;
+	unsigned int	cache_entry_index;
+	bool plus;
+	bool eof;
+} nfs_readdir_descriptor_t;
+
 struct nfs_client_initdata {
 	unsigned long init_flags;
 	const char *hostname;			/* Hostname of the server */
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
index 69971f6c840d..972759325de0 100644
--- a/fs/nfs/nfs3xdr.c
+++ b/fs/nfs/nfs3xdr.c
@@ -21,8 +21,8 @@ 
 #include <linux/nfs3.h>
 #include <linux/nfs_fs.h>
 #include <linux/nfsacl.h>
-#include "nfstrace.h"
 #include "internal.h"
+#include "nfstrace.h"
 
 #define NFSDBG_FACILITY		NFSDBG_XDR