Commit b6cfbeca authored by David Howells's avatar David Howells Committed by Al Viro

afs: Handle CONFIG_PROC_FS=n

The AFS filesystem depends at the moment on /proc for configuration and
also presents information that way - however, this causes a compilation
failure if procfs is disabled.

Fix it so that the procfs bits aren't compiled in if procfs is disabled.

This means that you can't configure the AFS filesystem directly, but it is
still usable provided that an up-to-date keyutils is installed to look up
cells by SRV or AFSDB DNS records.
Reported-by: default avatarAl Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 24074a35
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
afs-cache-$(CONFIG_AFS_FSCACHE) := cache.o afs-cache-$(CONFIG_AFS_FSCACHE) := cache.o
kafs-objs := \ kafs-y := \
$(afs-cache-y) \ $(afs-cache-y) \
addr_list.o \ addr_list.o \
callback.o \ callback.o \
...@@ -21,7 +21,6 @@ kafs-objs := \ ...@@ -21,7 +21,6 @@ kafs-objs := \
main.o \ main.o \
misc.o \ misc.o \
mntpt.o \ mntpt.o \
proc.o \
rotate.o \ rotate.o \
rxrpc.o \ rxrpc.o \
security.o \ security.o \
...@@ -34,4 +33,5 @@ kafs-objs := \ ...@@ -34,4 +33,5 @@ kafs-objs := \
write.o \ write.o \
xattr.o xattr.o
kafs-$(CONFIG_PROC_FS) += proc.o
obj-$(CONFIG_AFS_FS) := kafs.o obj-$(CONFIG_AFS_FS) := kafs.o
...@@ -871,11 +871,19 @@ extern int afs_get_ipv4_interfaces(struct afs_net *, struct afs_interface *, ...@@ -871,11 +871,19 @@ extern int afs_get_ipv4_interfaces(struct afs_net *, struct afs_interface *,
/* /*
* proc.c * proc.c
*/ */
#ifdef CONFIG_PROC_FS
extern int __net_init afs_proc_init(struct afs_net *); extern int __net_init afs_proc_init(struct afs_net *);
extern void __net_exit afs_proc_cleanup(struct afs_net *); extern void __net_exit afs_proc_cleanup(struct afs_net *);
extern int afs_proc_cell_setup(struct afs_cell *); extern int afs_proc_cell_setup(struct afs_cell *);
extern void afs_proc_cell_remove(struct afs_cell *); extern void afs_proc_cell_remove(struct afs_cell *);
extern void afs_put_sysnames(struct afs_sysnames *); extern void afs_put_sysnames(struct afs_sysnames *);
#else
static inline int afs_proc_init(struct afs_net *net) { return 0; }
static inline void afs_proc_cleanup(struct afs_net *net) {}
static inline int afs_proc_cell_setup(struct afs_cell *cell) { return 0; }
static inline void afs_proc_cell_remove(struct afs_cell *cell) {}
static inline void afs_put_sysnames(struct afs_sysnames *sysnames) {}
#endif
/* /*
* rotate.c * rotate.c
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment