diff options
Diffstat (limited to 'fs/locks.c')
| -rw-r--r-- | fs/locks.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/fs/locks.c b/fs/locks.c index 250ef53d25ef..fb32d6218e21 100644 --- a/fs/locks.c +++ b/fs/locks.c | |||
| @@ -1958,22 +1958,18 @@ EXPORT_SYMBOL(posix_block_lock); | |||
| 1958 | * | 1958 | * |
| 1959 | * lockd needs to block waiting for locks. | 1959 | * lockd needs to block waiting for locks. |
| 1960 | */ | 1960 | */ |
| 1961 | void | 1961 | int |
| 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 | /* | 1964 | int status = 0; |
| 1965 | * A remote machine may cancel the lock request after it's been | 1965 | |
| 1966 | * granted locally. If that happens, we need to delete the lock. | ||
| 1967 | */ | ||
| 1968 | lock_kernel(); | 1966 | lock_kernel(); |
| 1969 | if (waiter->fl_next) { | 1967 | if (waiter->fl_next) |
| 1970 | __locks_delete_block(waiter); | 1968 | __locks_delete_block(waiter); |
| 1971 | unlock_kernel(); | 1969 | else |
| 1972 | } else { | 1970 | status = -ENOENT; |
| 1973 | unlock_kernel(); | 1971 | unlock_kernel(); |
| 1974 | waiter->fl_type = F_UNLCK; | 1972 | return status; |
| 1975 | posix_lock_file(filp, waiter); | ||
| 1976 | } | ||
| 1977 | } | 1973 | } |
| 1978 | 1974 | ||
| 1979 | EXPORT_SYMBOL(posix_unblock_lock); | 1975 | EXPORT_SYMBOL(posix_unblock_lock); |
