[PATCH] afs: don't compile proc.o at all
Alexey Dobriyan
adobriyan at gmail.com
Thu Aug 27 13:32:38 EDT 2009
Don't compile in fs/afs/proc.o if PROC_FS support is absent.
Signed-off-by: Alexey Dobriyan <adobriyan at gmail.com>
---
fs/afs/Makefile | 4 +++-
fs/afs/internal.h | 20 ++++++++++++++++++++
2 files changed, 23 insertions(+), 1 deletion(-)
--- a/fs/afs/Makefile
+++ b/fs/afs/Makefile
@@ -17,7 +17,6 @@ kafs-objs := \
main.o \
misc.o \
mntpt.o \
- proc.o \
rxrpc.o \
security.o \
server.o \
@@ -29,4 +28,7 @@ kafs-objs := \
volume.o \
write.o
+ifeq ($(CONFIG_PROC_FS),y)
+kafs-objs += proc.o
+endif
obj-$(CONFIG_AFS_FS) := kafs.o
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -583,6 +583,7 @@ extern const struct file_operations afs_mntpt_file_operations;
extern int afs_mntpt_check_symlink(struct afs_vnode *, struct key *);
extern void afs_mntpt_kill_timer(void);
+#ifdef CONFIG_PROC_FS
/*
* proc.c
*/
@@ -590,6 +591,25 @@ extern int afs_proc_init(void);
extern void afs_proc_cleanup(void);
extern int afs_proc_cell_setup(struct afs_cell *);
extern void afs_proc_cell_remove(struct afs_cell *);
+#else
+static inline int afs_proc_init(void)
+{
+ return 0;
+}
+
+static inline void afs_proc_cleanup(void)
+{
+}
+
+static inline int afs_proc_cell_setup(struct afs_cell *cell)
+{
+ return 0;
+}
+
+static inline void afs_proc_cell_remove(struct afs_cell *cell)
+{
+}
+#endif
/*
* rxrpc.c
More information about the linux-afs
mailing list