# Re: \[PATCH\] locks: Ability to test for flock presence on fd

- From: Pavel Emelyanov \<hidden\>
- Date: 2014-09-03 15:47:57 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2014/09/87618
- Thread: https://ratatoskr.run/linux-api/2014/09/87618/t.md

```text
On 09/03/2014 07:44 PM, J. Bruce Fields wrote:
...

>> Hope this explanation is more clear.
> 
> Thanks, I think I understand.
> 
> Remind me how you figure out which file descriptors point to the same
> file description (struct file)?

We do it with the help of kcmp() syscall:
https://github.com/cyrillos/linux-2.6/commit/951bc60c6a

Thanks,
Pavel
```
