aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-28 21:02:55 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-28 21:02:55 -0500
commitb6669737d3db7df79fad07180837c23dbe581db5 (patch)
tree671a9d13fe5ab00d6a3c7c5c5c466802ca96d38a /fs/lockd
parent1cf0209c431fa7790253c532039d53b0773193aa (diff)
parentdc107402ae06286a9ed33c32daf3f35514a7cb8d (diff)
Merge branch 'for-3.9' of git://linux-nfs.org/~bfields/linux
Pull nfsd changes from J Bruce Fields: "Miscellaneous bugfixes, plus: - An overhaul of the DRC cache by Jeff Layton. The main effect is just to make it larger. This decreases the chances of intermittent errors especially in the UDP case. But we'll need to watch for any reports of performance regressions. - Containerized nfsd: with some limitations, we now support per-container nfs-service, thanks to extensive work from Stanislav Kinsbursky over the last year." Some notes about conflicts, since there were *two* non-data semantic conflicts here: - idr_remove_all() had been added by a memory leak fix, but has since become deprecated since idr_destroy() does it for us now. - xs_local_connect() had been added by this branch to make AF_LOCAL connections be synchronous, but in the meantime Trond had changed the calling convention in order to avoid a RCU dereference. There were a couple of more obvious actual source-level conflicts due to the hlist traversal changes and one just due to code changes next to each other, but those were trivial. * 'for-3.9' of git://linux-nfs.org/~bfields/linux: (49 commits) SUNRPC: make AF_LOCAL connect synchronous nfsd: fix compiler warning about ambiguous types in nfsd_cache_csum svcrpc: fix rpc server shutdown races svcrpc: make svc_age_temp_xprts enqueue under sv_lock lockd: nlmclnt_reclaim(): avoid stack overflow nfsd: enable NFSv4 state in containers nfsd: disable usermode helper client tracker in container nfsd: use proper net while reading "exports" file nfsd: containerize NFSd filesystem nfsd: fix comments on nfsd_cache_lookup SUNRPC: move cache_detail->cache_request callback call to cache_read() SUNRPC: remove "cache_request" argument in sunrpc_cache_pipe_upcall() function SUNRPC: rework cache upcall logic SUNRPC: introduce cache_detail->cache_request callback NFS: simplify and clean cache library NFS: use SUNRPC cache creation and destruction helper for DNS cache nfsd4: free_stid can be static nfsd: keep a checksum of the first 256 bytes of request sunrpc: trim off trailing checksum before returning decrypted or integrity authenticated buffer sunrpc: fix comment in struct xdr_buf definition ...
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/clntlock.c14
-rw-r--r--fs/lockd/clntproc.c6
-rw-r--r--fs/lockd/host.c1
-rw-r--r--fs/lockd/mon.c1
-rw-r--r--fs/lockd/svcsubs.c2
5 files changed, 17 insertions, 7 deletions
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c
index a2717408c478..0796c45d0d4d 100644
--- a/fs/lockd/clntlock.c
+++ b/fs/lockd/clntlock.c
@@ -11,7 +11,7 @@
11#include <linux/slab.h> 11#include <linux/slab.h>
12#include <linux/time.h> 12#include <linux/time.h>
13#include <linux/nfs_fs.h> 13#include <linux/nfs_fs.h>
14#include <linux/sunrpc/clnt.h> 14#include <linux/sunrpc/addr.h>
15#include <linux/sunrpc/svc.h> 15#include <linux/sunrpc/svc.h>
16#include <linux/lockd/lockd.h> 16#include <linux/lockd/lockd.h>
17#include <linux/kthread.h> 17#include <linux/kthread.h>
@@ -220,10 +220,19 @@ reclaimer(void *ptr)
220{ 220{
221 struct nlm_host *host = (struct nlm_host *) ptr; 221 struct nlm_host *host = (struct nlm_host *) ptr;
222 struct nlm_wait *block; 222 struct nlm_wait *block;
223 struct nlm_rqst *req;
223 struct file_lock *fl, *next; 224 struct file_lock *fl, *next;
224 u32 nsmstate; 225 u32 nsmstate;
225 struct net *net = host->net; 226 struct net *net = host->net;
226 227
228 req = kmalloc(sizeof(*req), GFP_KERNEL);
229 if (!req) {
230 printk(KERN_ERR "lockd: reclaimer unable to alloc memory."
231 " Locks for %s won't be reclaimed!\n",
232 host->h_name);
233 return 0;
234 }
235
227 allow_signal(SIGKILL); 236 allow_signal(SIGKILL);
228 237
229 down_write(&host->h_rwsem); 238 down_write(&host->h_rwsem);
@@ -253,7 +262,7 @@ restart:
253 */ 262 */
254 if (signalled()) 263 if (signalled())
255 continue; 264 continue;
256 if (nlmclnt_reclaim(host, fl) != 0) 265 if (nlmclnt_reclaim(host, fl, req) != 0)
257 continue; 266 continue;
258 list_add_tail(&fl->fl_u.nfs_fl.list, &host->h_granted); 267 list_add_tail(&fl->fl_u.nfs_fl.list, &host->h_granted);
259 if (host->h_nsmstate != nsmstate) { 268 if (host->h_nsmstate != nsmstate) {
@@ -279,5 +288,6 @@ restart:
279 /* Release host handle after use */ 288 /* Release host handle after use */
280 nlmclnt_release_host(host); 289 nlmclnt_release_host(host);
281 lockd_down(net); 290 lockd_down(net);
291 kfree(req);
282 return 0; 292 return 0;
283} 293}
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
index 366277190b82..7e529c3c45c0 100644
--- a/fs/lockd/clntproc.c
+++ b/fs/lockd/clntproc.c
@@ -618,17 +618,15 @@ out_unlock:
618 * RECLAIM: Try to reclaim a lock 618 * RECLAIM: Try to reclaim a lock
619 */ 619 */
620int 620int
621nlmclnt_reclaim(struct nlm_host *host, struct file_lock *fl) 621nlmclnt_reclaim(struct nlm_host *host, struct file_lock *fl,
622 struct nlm_rqst *req)
622{ 623{
623 struct nlm_rqst reqst, *req;
624 int status; 624 int status;
625 625
626 req = &reqst;
627 memset(req, 0, sizeof(*req)); 626 memset(req, 0, sizeof(*req));
628 locks_init_lock(&req->a_args.lock.fl); 627 locks_init_lock(&req->a_args.lock.fl);
629 locks_init_lock(&req->a_res.lock.fl); 628 locks_init_lock(&req->a_res.lock.fl);
630 req->a_host = host; 629 req->a_host = host;
631 req->a_flags = 0;
632 630
633 /* Set up the argument struct */ 631 /* Set up the argument struct */
634 nlmclnt_setlockargs(req, fl); 632 nlmclnt_setlockargs(req, fl);
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index abdd75d44dd4..969d589c848d 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -13,6 +13,7 @@
13#include <linux/in.h> 13#include <linux/in.h>
14#include <linux/in6.h> 14#include <linux/in6.h>
15#include <linux/sunrpc/clnt.h> 15#include <linux/sunrpc/clnt.h>
16#include <linux/sunrpc/addr.h>
16#include <linux/sunrpc/svc.h> 17#include <linux/sunrpc/svc.h>
17#include <linux/lockd/lockd.h> 18#include <linux/lockd/lockd.h>
18#include <linux/mutex.h> 19#include <linux/mutex.h>
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index 3c2cfc683631..1812f026960c 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -12,6 +12,7 @@
12#include <linux/slab.h> 12#include <linux/slab.h>
13 13
14#include <linux/sunrpc/clnt.h> 14#include <linux/sunrpc/clnt.h>
15#include <linux/sunrpc/addr.h>
15#include <linux/sunrpc/xprtsock.h> 16#include <linux/sunrpc/xprtsock.h>
16#include <linux/sunrpc/svc.h> 17#include <linux/sunrpc/svc.h>
17#include <linux/lockd/lockd.h> 18#include <linux/lockd/lockd.h>
diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c
index d17bb62b06d6..97e87415b145 100644
--- a/fs/lockd/svcsubs.c
+++ b/fs/lockd/svcsubs.c
@@ -13,7 +13,7 @@
13#include <linux/slab.h> 13#include <linux/slab.h>
14#include <linux/mutex.h> 14#include <linux/mutex.h>
15#include <linux/sunrpc/svc.h> 15#include <linux/sunrpc/svc.h>
16#include <linux/sunrpc/clnt.h> 16#include <linux/sunrpc/addr.h>
17#include <linux/nfsd/nfsfh.h> 17#include <linux/nfsd/nfsfh.h>
18#include <linux/nfsd/export.h> 18#include <linux/nfsd/export.h>
19#include <linux/lockd/lockd.h> 19#include <linux/lockd/lockd.h>