|
|
struct lm_lockname *name, | struct lm_lockname *name, |
struct file *file, struct file_lock *fl) | struct file *file, struct file_lock *fl) |
{ | { |
struct file_lock tmp; |
struct file_lock *tmp; |
int ret; |
|
| |
lock_kernel(); | lock_kernel(); |
ret = posix_test_lock(file, fl, &tmp); |
tmp = posix_test_lock(file, fl); |
fl->fl_type = F_UNLCK; | fl->fl_type = F_UNLCK; |
if (ret) |
if (tmp) |
memcpy(fl, &tmp, sizeof(struct file_lock)); |
memcpy(fl, tmp, sizeof(struct file_lock)); |
unlock_kernel(); | unlock_kernel(); |
| |
return 0; | return 0; |