ceph: return EBADF if waiting for caps on closed file
authorSage Weil <sage@newdream.net>
Mon, 1 Mar 2010 17:57:54 +0000 (09:57 -0800)
committerSage Weil <sage@newdream.net>
Mon, 1 Mar 2010 23:28:00 +0000 (15:28 -0800)
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: Sage Weil <sage@newdream.net>

No differences found