From patchwork Thu Aug 16 20:23:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 1335081 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 3F92BDFB34 for ; Thu, 16 Aug 2012 20:24:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751815Ab2HPUYX (ORCPT ); Thu, 16 Aug 2012 16:24:23 -0400 Received: from mx2.netapp.com ([216.240.18.37]:23347 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752652Ab2HPUYW (ORCPT ); Thu, 16 Aug 2012 16:24:22 -0400 X-IronPort-AV: E=Sophos;i="4.77,780,1336374000"; d="scan'208";a="677278018" Received: from smtp2.corp.netapp.com ([10.57.159.114]) by mx2-out.netapp.com with ESMTP; 16 Aug 2012 13:23:50 -0700 Received: from lade.trondhjem.org.com (schennel-pc.hq.netapp.com [10.63.232.234]) by smtp2.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id q7GKNk1H007670; Thu, 16 Aug 2012 13:23:49 -0700 (PDT) From: Trond Myklebust To: William Dauchy Cc: Shai Lazmi , Bryan Schumaker , linux-nfs@vger.kernel.org Subject: [PATCH 2/2] NFS: return -ENOKEY when the upcall fails to map the name Date: Thu, 16 Aug 2012 16:23:42 -0400 Message-Id: <1345148622-10845-2-git-send-email-Trond.Myklebust@netapp.com> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1345148622-10845-1-git-send-email-Trond.Myklebust@netapp.com> References: <1345148622-10845-1-git-send-email-Trond.Myklebust@netapp.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Bryan Schumaker This allows the normal error-paths to handle the error, rather than making a special call to complete_request_key() just for this instance. Signed-off-by: Bryan Schumaker Tested-by: William Dauchy Cc: stable@vger.kernel.org [>= 3.4] Signed-off-by: Trond Myklebust --- fs/nfs/idmap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index 6703c73..a850079 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c @@ -760,9 +760,8 @@ idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) } if (!(im.im_status & IDMAP_STATUS_SUCCESS)) { - ret = mlen; - complete_request_key(cons, -ENOKEY); - goto out_incomplete; + ret = -ENOKEY; + goto out; } namelen_in = strnlen(im.im_name, IDMAP_NAMESZ); @@ -779,7 +778,6 @@ idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) out: complete_request_key(cons, ret); -out_incomplete: return ret; }