[PATCH] O_DIRECT open() fix
Trivial bugfix: opening a file that doesn't have ->direct_IO() with O_DIRECT passed in flags fails (as it should) but doesn't call ->release() even though ->open() had been successful. IOW, we have a leak there - e.g. open() of a tty with O_DIRECT will leak a reference to tty and tty_driver. Besides, quite a few drivers are _not_ happy with struct file being freed without ->release() after ->open() has returned 0.
Showing
Please register or sign in to comment