On Sat, May 05, 2012 at 06:05:54PM +0800, Liu Yuan wrote: > > if (is_io_op(req->op)) { > > req->work.fn = do_io_request; > > req->work.done = io_op_done; > > > > Well, on the second look, free_request() calls put_vnode_info()... it > seems that we have to call get_vnode_info() for every request queuing, no? It checks for it beeing non-NULL first, and thus is fine. That beeing said I generally prefer the checks outside as they force a programming style that forces understanding what's going on. |