summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2010-10-28 08:17:54 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-22 11:03:17 -0800
commit9c1560611de6c695d146f9b4e78d576d3338b1ed (patch)
treee6edaec5a7177d6d48d7ccae9506a7295930853f /fs
parentbf54d251e555dbf5122621970c52a6e35df571f5 (diff)
Fixed Regression in NFS Direct I/O path
commit 568a810d7edd58bd505222dd1c7e48895532290b upstream. 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 <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/direct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 064a80961677..84d3c8b90206 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -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;