diff options
-rw-r--r-- | fs/lockd/svclock.c | 5 | ||||
-rw-r--r-- | fs/locks.c | 13 |
2 files changed, 2 insertions, 16 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index e42f0cc6c450..5fb48b4390bd 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c | |||
@@ -240,11 +240,6 @@ nlmsvc_delete_block(struct nlm_block *block, int unlock) | |||
240 | nlmsvc_remove_block(block); | 240 | nlmsvc_remove_block(block); |
241 | if (fl->fl_next) | 241 | if (fl->fl_next) |
242 | posix_unblock_lock(file->f_file, fl); | 242 | posix_unblock_lock(file->f_file, fl); |
243 | if (unlock) { | ||
244 | fl->fl_type = F_UNLCK; | ||
245 | posix_lock_file(file->f_file, fl); | ||
246 | block->b_granted = 0; | ||
247 | } | ||
248 | 243 | ||
249 | /* If the block is in the middle of a GRANT callback, | 244 | /* If the block is in the middle of a GRANT callback, |
250 | * don't kill it yet. */ | 245 | * don't kill it yet. */ |
diff --git a/fs/locks.c b/fs/locks.c index 250ef53d25ef..75650d52fe60 100644 --- a/fs/locks.c +++ b/fs/locks.c | |||
@@ -1961,19 +1961,10 @@ EXPORT_SYMBOL(posix_block_lock); | |||
1961 | void | 1961 | void |
1962 | posix_unblock_lock(struct file *filp, struct file_lock *waiter) | 1962 | posix_unblock_lock(struct file *filp, struct file_lock *waiter) |
1963 | { | 1963 | { |
1964 | /* | ||
1965 | * A remote machine may cancel the lock request after it's been | ||
1966 | * granted locally. If that happens, we need to delete the lock. | ||
1967 | */ | ||
1968 | lock_kernel(); | 1964 | lock_kernel(); |
1969 | if (waiter->fl_next) { | 1965 | if (waiter->fl_next) |
1970 | __locks_delete_block(waiter); | 1966 | __locks_delete_block(waiter); |
1971 | unlock_kernel(); | 1967 | unlock_kernel(); |
1972 | } else { | ||
1973 | unlock_kernel(); | ||
1974 | waiter->fl_type = F_UNLCK; | ||
1975 | posix_lock_file(filp, waiter); | ||
1976 | } | ||
1977 | } | 1968 | } |
1978 | 1969 | ||
1979 | EXPORT_SYMBOL(posix_unblock_lock); | 1970 | EXPORT_SYMBOL(posix_unblock_lock); |