Skip to content

Commit b900f4b

Browse files
committed
netfs: Split some core bits out into their own file
Split some core bits out into their own file. More bits will be added to this file later. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> cc: linux-cachefs@redhat.com Link: https://lore.kernel.org/r/164623006934.3564931.17932680017894039748.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/164678218407.1200972.1731208226140990280.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/164692920944.2099075.11990502173226013856.stgit@warthog.procyon.org.uk/ # v3
1 parent 1621126 commit b900f4b

File tree

4 files changed

+26
-12
lines changed

4 files changed

+26
-12
lines changed

fs/netfs/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
netfs-y := \
44
buffered_read.o \
55
io.o \
6+
main.o \
67
objects.o
78

89
netfs-$(CONFIG_NETFS_STATS) += stats.o

fs/netfs/internal.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@ void netfs_rreq_unlock_folios(struct netfs_io_request *rreq);
2323
/*
2424
* io.c
2525
*/
26-
extern unsigned int netfs_debug;
27-
2826
int netfs_begin_read(struct netfs_io_request *rreq, bool sync);
2927

28+
/*
29+
* main.c
30+
*/
31+
extern unsigned int netfs_debug;
32+
3033
/*
3134
* objects.c
3235
*/

fs/netfs/io.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@
1515
#include <linux/sched/mm.h>
1616
#include <linux/task_io_accounting_ops.h>
1717
#include "internal.h"
18-
#define CREATE_TRACE_POINTS
19-
#include <trace/events/netfs.h>
20-
21-
MODULE_DESCRIPTION("Network fs support");
22-
MODULE_AUTHOR("Red Hat, Inc.");
23-
MODULE_LICENSE("GPL");
24-
25-
unsigned netfs_debug;
26-
module_param_named(debug, netfs_debug, uint, S_IWUSR | S_IRUGO);
27-
MODULE_PARM_DESC(netfs_debug, "Netfs support debugging mask");
2818

2919
/*
3020
* Clear the unread part of an I/O request.

fs/netfs/main.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later
2+
/* Miscellaneous bits for the netfs support library.
3+
*
4+
* Copyright (C) 2022 Red Hat, Inc. All Rights Reserved.
5+
* Written by David Howells (dhowells@redhat.com)
6+
*/
7+
8+
#include <linux/module.h>
9+
#include <linux/export.h>
10+
#include "internal.h"
11+
#define CREATE_TRACE_POINTS
12+
#include <trace/events/netfs.h>
13+
14+
MODULE_DESCRIPTION("Network fs support");
15+
MODULE_AUTHOR("Red Hat, Inc.");
16+
MODULE_LICENSE("GPL");
17+
18+
unsigned netfs_debug;
19+
module_param_named(debug, netfs_debug, uint, S_IWUSR | S_IRUGO);
20+
MODULE_PARM_DESC(netfs_debug, "Netfs support debugging mask");

0 commit comments

Comments
 (0)