Christoph Hellwig wrote: >>+#define RETURN_UP(retval) do {up(&sony_sem); return (retval);} while(0) > > > Please don't use such obsfucation macros. Instead use gotos in the > functions to haev a single exit path that releases the lock. OK, here's next version of the patch, now without that macro. It also adds set_capacity() call so dd can now be used to create CD image. I've also found and fixed some other problems (like the handle_abort_timeout that I broke in the previous patch). -- Ondrej Zary