Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7790029 authored by Jeff Layton's avatar Jeff Layton Committed by J. Bruce Fields
Browse files

lockd: move lockd's grace period handling into its own module



Currently, all of the grace period handling is part of lockd. Eventually
though we'd like to be able to build v4-only servers, at which point
we'll need to put all of this elsewhere.

Move the code itself into fs/nfs_common and have it build a grace.ko
module. Then, rejigger the Kconfig options so that both nfsd and lockd
enable it automatically.

Signed-off-by: default avatarJeff Layton <jlayton@primarydata.com>
parent f0c63124
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -233,9 +233,13 @@ if NETWORK_FILESYSTEMS
source "fs/nfs/Kconfig"
source "fs/nfsd/Kconfig"

config GRACE_PERIOD
	tristate

config LOCKD
	tristate
	depends on FILE_LOCKING
	select GRACE_PERIOD

config LOCKD_V4
	bool
@@ -249,7 +253,7 @@ config NFS_ACL_SUPPORT

config NFS_COMMON
	bool
	depends on NFSD || NFS_FS
	depends on NFSD || NFS_FS || LOCKD
	default y

source "net/sunrpc/Kconfig"
+1 −1
Original line number Diff line number Diff line
@@ -5,6 +5,6 @@
obj-$(CONFIG_LOCKD) += lockd.o

lockd-objs-y := clntlock.o clntproc.o clntxdr.o host.o svc.o svclock.o \
	        svcshare.o svcproc.o svcsubs.o mon.o xdr.o grace.o
	        svcshare.o svcproc.o svcsubs.o mon.o xdr.o
lockd-objs-$(CONFIG_LOCKD_V4) += clnt4xdr.o xdr4.o svc4proc.o
lockd-objs		      := $(lockd-objs-y)
+0 −1
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@ struct lockd_net {

	struct delayed_work grace_period_end;
	struct lock_manager lockd_manager;
	struct list_head grace_list;

	spinlock_t nsm_clnt_lock;
	unsigned int nsm_users;
+1 −1
Original line number Diff line number Diff line
@@ -586,7 +586,7 @@ static int lockd_init_net(struct net *net)
	struct lockd_net *ln = net_generic(net, lockd_net_id);

	INIT_DELAYED_WORK(&ln->grace_period_end, grace_ender);
	INIT_LIST_HEAD(&ln->grace_list);
	INIT_LIST_HEAD(&ln->lockd_manager.list);
	spin_lock_init(&ln->nsm_clnt_lock);
	return 0;
}
+2 −1
Original line number Diff line number Diff line
@@ -3,5 +3,6 @@
#

obj-$(CONFIG_NFS_ACL_SUPPORT) += nfs_acl.o

nfs_acl-objs := nfsacl.o

obj-$(CONFIG_GRACE_PERIOD) += grace.o
Loading