aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index cbe1b81c147d..87d4c48b6069 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2295,24 +2295,6 @@ void nfsd_break_deleg_cb(struct file_lock *fl)
2295 nfsd4_cb_recall(dp); 2295 nfsd4_cb_recall(dp);
2296} 2296}
2297 2297
2298/*
2299 * Called from setlease() with lock_flocks() held
2300 */
2301static
2302int nfsd_same_client_deleg_cb(struct file_lock *onlist, struct file_lock *try)
2303{
2304 struct nfs4_delegation *onlistd =
2305 (struct nfs4_delegation *)onlist->fl_owner;
2306 struct nfs4_delegation *tryd =
2307 (struct nfs4_delegation *)try->fl_owner;
2308
2309 if (onlist->fl_lmops != try->fl_lmops)
2310 return 0;
2311
2312 return onlistd->dl_client == tryd->dl_client;
2313}
2314
2315
2316static 2298static
2317int nfsd_change_deleg_cb(struct file_lock **onlist, int arg) 2299int nfsd_change_deleg_cb(struct file_lock **onlist, int arg)
2318{ 2300{
@@ -2324,7 +2306,6 @@ int nfsd_change_deleg_cb(struct file_lock **onlist, int arg)
2324 2306
2325static const struct lock_manager_operations nfsd_lease_mng_ops = { 2307static const struct lock_manager_operations nfsd_lease_mng_ops = {
2326 .fl_break = nfsd_break_deleg_cb, 2308 .fl_break = nfsd_break_deleg_cb,
2327 .fl_mylease = nfsd_same_client_deleg_cb,
2328 .fl_change = nfsd_change_deleg_cb, 2309 .fl_change = nfsd_change_deleg_cb,
2329}; 2310};
2330 2311
@@ -2630,7 +2611,7 @@ nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open, struct nfs4_sta
2630 dp->dl_flock = fl; 2611 dp->dl_flock = fl;
2631 2612
2632 /* vfs_setlease checks to see if delegation should be handed out. 2613 /* vfs_setlease checks to see if delegation should be handed out.
2633 * the lock_manager callbacks fl_mylease and fl_change are used 2614 * the lock_manager callback fl_change is used
2634 */ 2615 */
2635 if ((status = vfs_setlease(fl->fl_file, fl->fl_type, &fl))) { 2616 if ((status = vfs_setlease(fl->fl_file, fl->fl_type, &fl))) {
2636 dprintk("NFSD: setlease failed [%d], no delegation\n", status); 2617 dprintk("NFSD: setlease failed [%d], no delegation\n", status);