Fixed Regression in NFS Direct I/O path

A typo, introduced by commit f11ac8db, in the nfs_direct_write()
routine causes writes with O_DIRECT set to fail with a ENOMEM error.

Found-by: Jeff Layton <[email protected]>
Signed-off-by: Steve Dickson <[email protected]>
Cc: [email protected]
Signed-off-by: Trond Myklebust <[email protected]>
This commit is contained in:
Steve Dickson 2010-10-28 08:17:54 -04:00 • committed by Trond Myklebust
commit 568a810d7e

View file

@ -873,7 +873,7 @@ static ssize_t nfs_direct_write(struct kiocb *iocb, const struct iovec *iov,
dreq->inode = inode;
dreq->ctx = get_nfs_open_context(nfs_file_open_context(iocb->ki_filp));
dreq->l_ctx = nfs_get_lock_context(dreq->ctx);
if (dreq->l_ctx != NULL)
if (dreq->l_ctx == NULL)
goto out_release;
if (!is_sync_kiocb(iocb))
dreq->iocb = iocb;