io_close_prep returns EBADF if REQ_F_FIXED_FILE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Is there any specific reason for which io_close_prep returns EBADF if
using REQ_F_FIXED_FILE?

I discovered my software was failing to close sockets when using fixed
files a while ago but I put it to the side, initially thinking it was
a bug I introduced in my code.
In recent days I picked it up again and after investigating it, it
looks like that, instead, that's the expected behaviour.

>From what I see, although the behaviour was slightly changed with a
couple of commits (ie. with
https://github.com/torvalds/linux/commit/cf3040ca55f2085b0a372a620ee2cb93ae19b686
) the io_close_prep have had this behaviour from the very beginning
https://github.com/torvalds/linux/commit/b5dba59e0cf7e2cc4d3b3b1ac5fe81ddf21959eb
.

@Jens during my researches I have also found
https://lkml.org/lkml/2020/5/7/1575 where there is a patch that
allows, at least from what it looks like at a first glance, fixed
files with io_close_prep but seems that the email thread died there.

Shouldn't the close op match the behaviour of the other I/O related
ops when it comes to fds?

If there aren't specific reasons, happy to look into it and write a patch.


Thanks,
Daniele



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux