Skip to content
Commit 195d3ce2 authored by Sage Weil's avatar Sage Weil
Browse files

ceph: return EBADF if waiting for caps on closed file



Verify the file is actually open for the given caps when we are
waiting for caps.  This ensures we will wake up and return EBADF
if another thread closes the file out from under us.

Note that EBADF is also the correct return code from write(2)
when called on a file handle opened for reading (although the
vfs should catch that).

Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 6f863e71
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment