diff options
Diffstat (limited to 'fs/lockd')
| -rw-r--r-- | fs/lockd/clnt4xdr.c | 2 | ||||
| -rw-r--r-- | fs/lockd/clntxdr.c | 2 | ||||
| -rw-r--r-- | fs/lockd/svc.c | 9 | ||||
| -rw-r--r-- | fs/lockd/svclock.c | 8 | ||||
| -rw-r--r-- | fs/lockd/svcsubs.c | 3 | ||||
| -rw-r--r-- | fs/lockd/xdr.c | 2 | 
6 files changed, 20 insertions, 6 deletions
diff --git a/fs/lockd/clnt4xdr.c b/fs/lockd/clnt4xdr.c index 00ec0b9c94d..d3e40db2893 100644 --- a/fs/lockd/clnt4xdr.c +++ b/fs/lockd/clnt4xdr.c @@ -14,6 +14,8 @@  #include <linux/sunrpc/stats.h>  #include <linux/lockd/lockd.h> +#include <uapi/linux/nfs3.h> +  #define NLMDBG_FACILITY		NLMDBG_XDR  #if (NLMCLNT_OHSIZE > XDR_MAX_NETOBJ) diff --git a/fs/lockd/clntxdr.c b/fs/lockd/clntxdr.c index 9a55797a1cd..3e9f7874b97 100644 --- a/fs/lockd/clntxdr.c +++ b/fs/lockd/clntxdr.c @@ -15,6 +15,8 @@  #include <linux/sunrpc/stats.h>  #include <linux/lockd/lockd.h> +#include <uapi/linux/nfs2.h> +  #define NLMDBG_FACILITY		NLMDBG_XDR  #if (NLMCLNT_OHSIZE > XDR_MAX_NETOBJ) diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 10d6c41aeca..8f27c93f8d2 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -235,6 +235,7 @@ out_err:  	if (warned++ == 0)  		printk(KERN_WARNING  			"lockd_up: makesock failed, error=%d\n", err); +	svc_shutdown_net(serv, net);  	return err;  } @@ -435,7 +436,7 @@ EXPORT_SYMBOL_GPL(lockd_down);   * Sysctl parameters (same as module parameters, different interface).   */ -static ctl_table nlm_sysctls[] = { +static struct ctl_table nlm_sysctls[] = {  	{  		.procname	= "nlm_grace_period",  		.data		= &nlm_grace_period, @@ -489,7 +490,7 @@ static ctl_table nlm_sysctls[] = {  	{ }  }; -static ctl_table nlm_sysctl_dir[] = { +static struct ctl_table nlm_sysctl_dir[] = {  	{  		.procname	= "nfs",  		.mode		= 0555, @@ -498,7 +499,7 @@ static ctl_table nlm_sysctl_dir[] = {  	{ }  }; -static ctl_table nlm_sysctl_root[] = { +static struct ctl_table nlm_sysctl_root[] = {  	{  		.procname	= "fs",  		.mode		= 0555, @@ -621,8 +622,8 @@ static int __init init_nlm(void)  err_pernet:  #ifdef CONFIG_SYSCTL  	unregister_sysctl_table(nlm_sysctl_table); -#endif  err_sysctl: +#endif  	return err;  } diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index e066a390297..ab798a88ec1 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c @@ -779,6 +779,7 @@ nlmsvc_grant_blocked(struct nlm_block *block)  	struct nlm_file		*file = block->b_file;  	struct nlm_lock		*lock = &block->b_call->a_args.lock;  	int			error; +	loff_t			fl_start, fl_end;  	dprintk("lockd: grant blocked lock %p\n", block); @@ -796,9 +797,16 @@ nlmsvc_grant_blocked(struct nlm_block *block)  	}  	/* Try the lock operation again */ +	/* vfs_lock_file() can mangle fl_start and fl_end, but we need +	 * them unchanged for the GRANT_MSG +	 */  	lock->fl.fl_flags |= FL_SLEEP; +	fl_start = lock->fl.fl_start; +	fl_end = lock->fl.fl_end;  	error = vfs_lock_file(file->f_file, F_SETLK, &lock->fl, NULL);  	lock->fl.fl_flags &= ~FL_SLEEP; +	lock->fl.fl_start = fl_start; +	lock->fl.fl_end = fl_end;  	switch (error) {  	case 0: diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c index dc5c75930f0..b6f3b84b6e9 100644 --- a/fs/lockd/svcsubs.c +++ b/fs/lockd/svcsubs.c @@ -14,12 +14,11 @@  #include <linux/mutex.h>  #include <linux/sunrpc/svc.h>  #include <linux/sunrpc/addr.h> -#include <linux/nfsd/nfsfh.h> -#include <linux/nfsd/export.h>  #include <linux/lockd/lockd.h>  #include <linux/lockd/share.h>  #include <linux/module.h>  #include <linux/mount.h> +#include <uapi/linux/nfs2.h>  #define NLMDBG_FACILITY		NLMDBG_SVCSUBS diff --git a/fs/lockd/xdr.c b/fs/lockd/xdr.c index 964666c68a8..9340e7e10ef 100644 --- a/fs/lockd/xdr.c +++ b/fs/lockd/xdr.c @@ -16,6 +16,8 @@  #include <linux/sunrpc/stats.h>  #include <linux/lockd/lockd.h> +#include <uapi/linux/nfs2.h> +  #define NLMDBG_FACILITY		NLMDBG_XDR  | 
