From: Steve Dickson Date: Thu, 28 Oct 2010 12:17:54 +0000 (-0400) Subject: Fixed Regression in NFS Direct I/O path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=568a810d7edd58bd505222dd1c7e48895532290b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Steve Dickson Cc: stable@kernel.org Signed-off-by: Trond Myklebust --- 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;