1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Linux Kernel 2.6.18 Linux Kernel 2.6.26 ========================================== ============================================= #define nfs_wait_event(clnt, wq, condition) #define nfs_wait_event(clnt, wq, condition) ({ ({ int __retval = 0; int __retval = wait_event_killable(wq, condition); if (clnt->cl_intr) { __retval; sigset_t oldmask; }) rpc_clnt_sigmask(clnt, &oldmask); __retval = wait_event_interruptible(wq, condition); rpc_clnt_sigunmask(clnt, &oldmask); } else wait_event(wq, condition); __retval; }) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | Linux Kernel 2.6.18 ================================= static ssize_t nfs_direct_wait(struct nfs_direct_req *dreq) { ssize_t result = -EIOCBQUEUED; /* Async requests don't wait here */ if (dreq->iocb) goto out; result = wait_for_completion_interruptible(&dreq->completion); if (!result) result = dreq->error; if (!result) result = dreq->count; out: kref_put(&dreq->kref, nfs_direct_req_release); return (ssize_t) result; } Linux Kernel 2.6.26 ===================== static ssize_t nfs_direct_wait(struct nfs_direct_req *dreq) { ssize_t result = -EIOCBQUEUED; /* Async requests don't wait here */ if (dreq->iocb) goto out; result = wait_for_completion_killable(&dreq->completion); if (!result) result = dreq->error; if (!result) result = dreq->count; out: return (ssize_t) result; } |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |