diff options
author | J. Bruce Fields <bfields@redhat.com> | 2010-10-30 17:41:26 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-01-04 16:49:26 -0500 |
commit | e63eb9375089f9d2041305d04c3f33a194e0e014 (patch) | |
tree | c6c3b73e8af30267bfcddc5e128b09df6ea576c9 | |
parent | fdef7aa5d4020fd94ffcbf0078d6bd9e5a111e19 (diff) |
nfsd4: eliminate lease delete callback
nfsd controls the lifetime of the lease, not the lock code, so there's
no need for this callback on lease destruction.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r-- | Documentation/filesystems/Locking | 2 | ||||
-rw-r--r-- | fs/nfsd/nfs4state.c | 18 |
2 files changed, 0 insertions, 20 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index b6426f15b4ae..075be12bc531 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -327,14 +327,12 @@ fl_release_private: yes yes | |||
327 | prototypes: | 327 | prototypes: |
328 | int (*fl_compare_owner)(struct file_lock *, struct file_lock *); | 328 | int (*fl_compare_owner)(struct file_lock *, struct file_lock *); |
329 | void (*fl_notify)(struct file_lock *); /* unblock callback */ | 329 | void (*fl_notify)(struct file_lock *); /* unblock callback */ |
330 | void (*fl_release_private)(struct file_lock *); | ||
331 | void (*fl_break)(struct file_lock *); /* break_lease callback */ | 330 | void (*fl_break)(struct file_lock *); /* break_lease callback */ |
332 | 331 | ||
333 | locking rules: | 332 | locking rules: |
334 | BKL may block | 333 | BKL may block |
335 | fl_compare_owner: yes no | 334 | fl_compare_owner: yes no |
336 | fl_notify: yes no | 335 | fl_notify: yes no |
337 | fl_release_private: yes yes | ||
338 | fl_break: yes no | 336 | fl_break: yes no |
339 | 337 | ||
340 | Currently only NFSD and NLM provide instances of this class. None of the | 338 | Currently only NFSD and NLM provide instances of this class. None of the |
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index b82e36862044..2e44ad2539ab 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -2296,23 +2296,6 @@ void nfsd_break_deleg_cb(struct file_lock *fl) | |||
2296 | } | 2296 | } |
2297 | 2297 | ||
2298 | /* | 2298 | /* |
2299 | * The file_lock is being reapd. | ||
2300 | * | ||
2301 | * Called by locks_free_lock() with lock_flocks() held. | ||
2302 | */ | ||
2303 | static | ||
2304 | void nfsd_release_deleg_cb(struct file_lock *fl) | ||
2305 | { | ||
2306 | struct nfs4_delegation *dp = (struct nfs4_delegation *)fl->fl_owner; | ||
2307 | |||
2308 | dprintk("NFSD nfsd_release_deleg_cb: fl %p dp %p dl_count %d\n", fl,dp, atomic_read(&dp->dl_count)); | ||
2309 | |||
2310 | if (!(fl->fl_flags & FL_LEASE) || !dp) | ||
2311 | return; | ||
2312 | dp->dl_flock = NULL; | ||
2313 | } | ||
2314 | |||
2315 | /* | ||
2316 | * Called from setlease() with lock_flocks() held | 2299 | * Called from setlease() with lock_flocks() held |
2317 | */ | 2300 | */ |
2318 | static | 2301 | static |
@@ -2341,7 +2324,6 @@ int nfsd_change_deleg_cb(struct file_lock **onlist, int arg) | |||
2341 | 2324 | ||
2342 | static const struct lock_manager_operations nfsd_lease_mng_ops = { | 2325 | static const struct lock_manager_operations nfsd_lease_mng_ops = { |
2343 | .fl_break = nfsd_break_deleg_cb, | 2326 | .fl_break = nfsd_break_deleg_cb, |
2344 | .fl_release_private = nfsd_release_deleg_cb, | ||
2345 | .fl_mylease = nfsd_same_client_deleg_cb, | 2327 | .fl_mylease = nfsd_same_client_deleg_cb, |
2346 | .fl_change = nfsd_change_deleg_cb, | 2328 | .fl_change = nfsd_change_deleg_cb, |
2347 | }; | 2329 | }; |