Blame SOURCES/0046-fs-ntfs3-Add-missing-headers-and-forward-declaration.patch

Kmods SIG 63c143
From f239b3a95dd4f7daba26ea17f339a5b19a7d40a1 Mon Sep 17 00:00:00 2001
Kmods SIG 63c143
From: Kari Argillander <kari.argillander@gmail.com>
Kmods SIG 63c143
Date: Thu, 2 Sep 2021 19:15:23 +0300
Kmods SIG 63c143
Subject: [Backport f239b3a95dd4] src: Add missing headers and forward
Kmods SIG 63c143
 declarations to ntfs_fs.h
Kmods SIG 63c143
Kmods SIG 63c143
We do not have headers at all in this file. We should have them so that
Kmods SIG 63c143
not every .c file needs to include all of the stuff which this file need
Kmods SIG 63c143
for building. This way we can remove some headers from other files and
Kmods SIG 63c143
get better picture what is needed. This can save some compilation time.
Kmods SIG 63c143
And this can help if we sometimes want to separate this one big header.
Kmods SIG 63c143
Kmods SIG 63c143
Also use forward declarations for structs and enums when it not included
Kmods SIG 63c143
straight with include and it is used in function declarations input.
Kmods SIG 63c143
This will prevent possible compiler warning:
Kmods SIG 63c143
  xxx declared inside parameter list will not be visible
Kmods SIG 63c143
  outside of this definition or declaration
Kmods SIG 63c143
Kmods SIG 63c143
Here is list which I made when parsing this. There is not necessarily
Kmods SIG 63c143
all example from this header file, but this just proofs we need it.
Kmods SIG 63c143
Kmods SIG 63c143
<linux/blkdev.h> SECTOR_SHIFT
Kmods SIG 63c143
<linux/buffer_head.h> sb_bread(), put_bh
Kmods SIG 63c143
<linux/cleancache.h> put_page()
Kmods SIG 63c143
<linux/fs.h> struct inode (Just struct ntfs_inode need it)
Kmods SIG 63c143
<linux/highmem.h> kunmap(), kmap()
Kmods SIG 63c143
<linux/kernel.h> cpu_to_leXX() ALIGN
Kmods SIG 63c143
<linux/mm.h> kvfree()
Kmods SIG 63c143
<linux/mutex.h> struct mutex, mutex_(un/try)lock()
Kmods SIG 63c143
<linux/page-flags.h> PageError()
Kmods SIG 63c143
<linux/pagemap.h> read_mapping_page()
Kmods SIG 63c143
<linux/rbtree.h> struct rb_root
Kmods SIG 63c143
<linux/rwsem.h> struct rw_semaphore
Kmods SIG 63c143
<linux/slab.h> krfree(), kzalloc()
Kmods SIG 63c143
<linux/string.h> memset()
Kmods SIG 63c143
<linux/time64.h> struct timespec64
Kmods SIG 63c143
<linux/types.h> uXX, __leXX
Kmods SIG 63c143
<linux/uidgid.h> kuid_t, kgid_t
Kmods SIG 63c143
<asm/div64.h> do_div()
Kmods SIG 63c143
<asm/page.h> PAGE_SIZE
Kmods SIG 63c143
Kmods SIG 63c143
"debug.h" ntfs_err() (Just one entry. Maybe we can drop this)
Kmods SIG 63c143
"ntfs.h" Do you even ask?
Kmods SIG 63c143
Kmods SIG 63c143
Signed-off-by: Kari Argillander <kari.argillander@gmail.com>
Kmods SIG 63c143
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Kmods SIG 63c143
---
Kmods SIG 63c143
 src/ntfs_fs.h | 31 +++++++++++++++++++++++++++++++
Kmods SIG 63c143
 1 file changed, 31 insertions(+)
Kmods SIG 63c143
Kmods SIG 63c143
diff --git a/src/ntfs_fs.h b/src/ntfs_fs.h
Kmods SIG 63c143
index 372cda697dd4c587a82ed6381a1dd512b700d5c1..dae6dd4ac6198fe735749b8e1405e110da4ddd62 100644
Kmods SIG 63c143
--- a/src/ntfs_fs.h
Kmods SIG 63c143
+++ b/src/ntfs_fs.h
Kmods SIG 63c143
@@ -9,6 +9,37 @@
Kmods SIG 63c143
 #ifndef _LINUX_NTFS3_NTFS_FS_H
Kmods SIG 63c143
 #define _LINUX_NTFS3_NTFS_FS_H
Kmods SIG 63c143
 
Kmods SIG 63c143
+#include <linux/blkdev.h>
Kmods SIG 63c143
+#include <linux/buffer_head.h>
Kmods SIG 63c143
+#include <linux/cleancache.h>
Kmods SIG 63c143
+#include <linux/fs.h>
Kmods SIG 63c143
+#include <linux/highmem.h>
Kmods SIG 63c143
+#include <linux/kernel.h>
Kmods SIG 63c143
+#include <linux/mm.h>
Kmods SIG 63c143
+#include <linux/mutex.h>
Kmods SIG 63c143
+#include <linux/page-flags.h>
Kmods SIG 63c143
+#include <linux/pagemap.h>
Kmods SIG 63c143
+#include <linux/rbtree.h>
Kmods SIG 63c143
+#include <linux/rwsem.h>
Kmods SIG 63c143
+#include <linux/slab.h>
Kmods SIG 63c143
+#include <linux/string.h>
Kmods SIG 63c143
+#include <linux/time64.h>
Kmods SIG 63c143
+#include <linux/types.h>
Kmods SIG 63c143
+#include <linux/uidgid.h>
Kmods SIG 63c143
+#include <asm/div64.h>
Kmods SIG 63c143
+#include <asm/page.h>
Kmods SIG 63c143
+
Kmods SIG 63c143
+#include "debug.h"
Kmods SIG 63c143
+#include "ntfs.h"
Kmods SIG 63c143
+
Kmods SIG 63c143
+struct dentry;
Kmods SIG 63c143
+struct fiemap_extent_info;
Kmods SIG 63c143
+struct user_namespace;
Kmods SIG 63c143
+struct page;
Kmods SIG 63c143
+struct writeback_control;
Kmods SIG 63c143
+enum utf16_endian;
Kmods SIG 63c143
+
Kmods SIG 63c143
+
Kmods SIG 63c143
 #define MINUS_ONE_T			((size_t)(-1))
Kmods SIG 63c143
 /* Biggest MFT / smallest cluster */
Kmods SIG 63c143
 #define MAXIMUM_BYTES_PER_MFT		4096
Kmods SIG 63c143
-- 
Kmods SIG 63c143
2.31.1
Kmods SIG 63c143