diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 17:42:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 17:42:28 -0400 |
commit | 08843b79fb35d33859e0f8f11a7318341076e4d1 (patch) | |
tree | e56e122146985b359d50787e3d1df640c4582dfa /fs/locks.c | |
parent | cc8362b1f6d724e46f515121d442779924b19fec (diff) | |
parent | 2c142baa7b237584bae7dc28630851701497e1ef (diff) |
Merge branch 'nfsd-next' of git://linux-nfs.org/~bfields/linux
Pull nfsd changes from J. Bruce Fields:
"This has been an unusually quiet cycle--mostly bugfixes and cleanup.
The one large piece is Stanislav's work to containerize the server's
grace period--but that in itself is just one more step in a
not-yet-complete project to allow fully containerized nfs service.
There are a number of outstanding delegation, container, v4 state, and
gss patches that aren't quite ready yet; 3.7 may be wilder."
* 'nfsd-next' of git://linux-nfs.org/~bfields/linux: (35 commits)
NFSd: make boot_time variable per network namespace
NFSd: make grace end flag per network namespace
Lockd: move grace period management from lockd() to per-net functions
LockD: pass actual network namespace to grace period management functions
LockD: manage grace list per network namespace
SUNRPC: service request network namespace helper introduced
NFSd: make nfsd4_manager allocated per network namespace context.
LockD: make lockd manager allocated per network namespace
LockD: manage grace period per network namespace
Lockd: add more debug to host shutdown functions
Lockd: host complaining function introduced
LockD: manage used host count per networks namespace
LockD: manage garbage collection timeout per networks namespace
LockD: make garbage collector network namespace aware.
LockD: mark host per network namespace on garbage collect
nfsd4: fix missing fault_inject.h include
locks: move lease-specific code out of locks_delete_lock
locks: prevent side-effects of locks_release_private before file_lock is initialized
NFSd: set nfsd_serv to NULL after service destruction
NFSd: introduce nfsd_destroy() helper
...
Diffstat (limited to 'fs/locks.c')
-rw-r--r-- | fs/locks.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/fs/locks.c b/fs/locks.c index 82c353304f9e..cdcf219a7391 100644 --- a/fs/locks.c +++ b/fs/locks.c | |||
@@ -427,18 +427,8 @@ static void lease_break_callback(struct file_lock *fl) | |||
427 | kill_fasync(&fl->fl_fasync, SIGIO, POLL_MSG); | 427 | kill_fasync(&fl->fl_fasync, SIGIO, POLL_MSG); |
428 | } | 428 | } |
429 | 429 | ||
430 | static void lease_release_private_callback(struct file_lock *fl) | ||
431 | { | ||
432 | if (!fl->fl_file) | ||
433 | return; | ||
434 | |||
435 | f_delown(fl->fl_file); | ||
436 | fl->fl_file->f_owner.signum = 0; | ||
437 | } | ||
438 | |||
439 | static const struct lock_manager_operations lease_manager_ops = { | 430 | static const struct lock_manager_operations lease_manager_ops = { |
440 | .lm_break = lease_break_callback, | 431 | .lm_break = lease_break_callback, |
441 | .lm_release_private = lease_release_private_callback, | ||
442 | .lm_change = lease_modify, | 432 | .lm_change = lease_modify, |
443 | }; | 433 | }; |
444 | 434 | ||
@@ -580,12 +570,6 @@ static void locks_delete_lock(struct file_lock **thisfl_p) | |||
580 | fl->fl_next = NULL; | 570 | fl->fl_next = NULL; |
581 | list_del_init(&fl->fl_link); | 571 | list_del_init(&fl->fl_link); |
582 | 572 | ||
583 | fasync_helper(0, fl->fl_file, 0, &fl->fl_fasync); | ||
584 | if (fl->fl_fasync != NULL) { | ||
585 | printk(KERN_ERR "locks_delete_lock: fasync == %p\n", fl->fl_fasync); | ||
586 | fl->fl_fasync = NULL; | ||
587 | } | ||
588 | |||
589 | if (fl->fl_nspid) { | 573 | if (fl->fl_nspid) { |
590 | put_pid(fl->fl_nspid); | 574 | put_pid(fl->fl_nspid); |
591 | fl->fl_nspid = NULL; | 575 | fl->fl_nspid = NULL; |
@@ -1155,8 +1139,18 @@ int lease_modify(struct file_lock **before, int arg) | |||
1155 | return error; | 1139 | return error; |
1156 | lease_clear_pending(fl, arg); | 1140 | lease_clear_pending(fl, arg); |
1157 | locks_wake_up_blocks(fl); | 1141 | locks_wake_up_blocks(fl); |
1158 | if (arg == F_UNLCK) | 1142 | if (arg == F_UNLCK) { |
1143 | struct file *filp = fl->fl_file; | ||
1144 | |||
1145 | f_delown(filp); | ||
1146 | filp->f_owner.signum = 0; | ||
1147 | fasync_helper(0, fl->fl_file, 0, &fl->fl_fasync); | ||
1148 | if (fl->fl_fasync != NULL) { | ||
1149 | printk(KERN_ERR "locks_delete_lock: fasync == %p\n", fl->fl_fasync); | ||
1150 | fl->fl_fasync = NULL; | ||
1151 | } | ||
1159 | locks_delete_lock(before); | 1152 | locks_delete_lock(before); |
1153 | } | ||
1160 | return 0; | 1154 | return 0; |
1161 | } | 1155 | } |
1162 | 1156 | ||