Skip to contentSkip to conversation

cifs: distribute some bloat out of cifsglob.h

PATCH New Enzo Matsumiya 1 participant 1 message Aug 2, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: distribute some bloat out of cifsglob.h

Distribute structs, prototypes, and inline functions into file.h, inode.h, and the new dir.h.

Delete unused "dir_notify_req" struct from cifsglob.h

dir.h holds functions and structs related to dir operations. cifs_fattr was moved in there for convenience, but it should be moved to somewhere else once a proper directory structure is in place.

---
In hindsight, I should've sent this as a series to my previous patch "cifs: distribute some bloat out of cifsfs.{c,h}", as this one depends on that previous one.

Let me know if it's better doing that.

 fs/cifs/cifsacl.c  |   1 +
 fs/cifs/cifsglob.h | 397 +--------------------------------------------
 fs/cifs/connect.c  |   2 +
 fs/cifs/dir.h      |  77 +++++++++
 fs/cifs/file.h     | 239 +++++++++++++++++++++++++++
 fs/cifs/inode.c    |   1 +
 fs/cifs/inode.h    |  69 ++++++++
 fs/cifs/readdir.c  |   1 +
 fs/cifs/smb1ops.c  |   2 +
 fs/cifs/smb2misc.c |   2 +
 fs/cifs/smb2ops.c  |   1 +
 fs/cifs/smb2pdu.h  |   1 +
 12 files changed, 401 insertions(+), 392 deletions(-)
 create mode 100644 fs/cifs/dir.h
fs/cifs/cifsacl.c +1 -0
index fa480d62f313..5d311eead824 100644
@@ -20,6 +20,7 @@
 #include "cifsproto.h"
 #include "cifs_debug.h"
 #include "fs_context.h"
+#include "inode.h"
 
 /* security id for everyone/world system group */
 static const struct cifs_sid sid_everyone = {
fs/cifs/cifsglob.h +5 -392

453 lines not on this page · raw message

fs/cifs/connect.c +2 -0
index abb65dd7471f..cf393e97e44b 100644
@@ -34,6 +34,8 @@
 #include <linux/bvec.h>
 #include "cifspdu.h"
 #include "cifsglob.h"
+#include "file.h"
+#include "inode.h"
 #include "cifsproto.h"
 #include "cifs_unicode.h"
 #include "cifs_debug.h"
fs/cifs/dir.h new file +77 -0

77 lines not on this page · raw message

fs/cifs/file.h +239 -0

249 lines not on this page · raw message

fs/cifs/inode.c +1 -0
index 9c20e09cf00f..746754903fc0 100644
@@ -26,6 +26,7 @@
 #include "fs_context.h"
 #include "cifs_ioctl.h"
 #include "inode.h"
+#include "dir.h"
 
 extern const struct inode_operations cifs_dfs_referral_inode_operations;
 
fs/cifs/inode.h +69 -0

80 lines not on this page · raw message

fs/cifs/readdir.c +1 -0
index 384cabdf47ca..5c92970e9312 100644
@@ -21,6 +21,7 @@
 #include "cifsfs.h"
 #include "smb2proto.h"
 #include "fs_context.h"
+#include "dir.h"
 
 /*
  * To be safe - for UCS to UTF-8 with strings loaded with the rare long
fs/cifs/smb1ops.c +2 -0
index f36b2d2d40ca..7b5b62815a0d 100644
@@ -14,6 +14,8 @@
 #include "cifspdu.h"
 #include "cifs_unicode.h"
 #include "fs_context.h"
+#include "file.h"
+#include "inode.h"
 
 /*
  * An NT cancel request header looks just like the original request except:
fs/cifs/smb2misc.c +2 -0
index 818cc4dee0e2..cf57e85a3e69 100644
@@ -16,6 +16,8 @@
 #include "smb2status.h"
 #include "smb2glob.h"
 #include "nterr.h"
+#include "file.h"
+#include "inode.h"
 
 static int
 check_smb2_hdr(struct smb2_hdr *shdr, __u64 mid)
fs/cifs/smb2ops.c +1 -0
index 82dd2e973753..7ccacefdab3b 100644
@@ -27,6 +27,7 @@
 #include "smbdirect.h"
 #include "fscache.h"
 #include "fs_context.h"
+#include "dir.h"
 
 /* Change credits for different ops and return the total number of credits */
 static int
fs/cifs/smb2pdu.h +1 -0
index f57881b8464f..ef19306c52a1 100644
@@ -12,6 +12,7 @@
 #define _SMB2PDU_H
 
 #include <net/sock.h>
+#include "../smbfs_common/smb2pdu.h"
 #include "cifsacl.h"
 
 /* 52 transform hdr + 64 hdr + 88 create rsp */
Signature · 1 line
2.35.3