From patchwork Tue Nov 30 14:43:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 367051 X-Patchwork-Delegate: Trond.Myklebust@netapp.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAUEgeYF021776 for ; Tue, 30 Nov 2010 14:43:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750821Ab0K3Onk (ORCPT ); Tue, 30 Nov 2010 09:43:40 -0500 Received: from mx2.netapp.com ([216.240.18.37]:45636 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751168Ab0K3Onj (ORCPT ); Tue, 30 Nov 2010 09:43:39 -0500 X-IronPort-AV: E=Sophos;i="4.59,280,1288594800"; d="scan'208";a="488954223" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 30 Nov 2010 06:43:39 -0800 Received: from heimdal.trondhjem.org.com (heimdal.trondhjem.org [10.58.57.140] (may be forged)) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id oAUEhZUP019295; Tue, 30 Nov 2010 06:43:38 -0800 (PST) From: Trond Myklebust To: linux-nfs@vger.kernel.org Subject: [PATCH v3 4/5] NFSv4: Propagate the error NFS4ERR_BADOWNER to nfs4_do_setattr Date: Tue, 30 Nov 2010 09:43:30 -0500 Message-Id: <1291128211-7961-5-git-send-email-Trond.Myklebust@netapp.com> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1291128211-7961-4-git-send-email-Trond.Myklebust@netapp.com> References: <1291128211-7961-1-git-send-email-Trond.Myklebust@netapp.com> <1291128211-7961-2-git-send-email-Trond.Myklebust@netapp.com> <1291128211-7961-3-git-send-email-Trond.Myklebust@netapp.com> <1291128211-7961-4-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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 30 Nov 2010 14:43:41 +0000 (UTC) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 89b0430..e40ab0b 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -83,6 +83,8 @@ static int nfs4_map_errors(int err) switch (err) { case -NFS4ERR_RESOURCE: return -EREMOTEIO; + case -NFS4ERR_BADOWNER: + return -EINVAL; default: dprintk("%s could not handle NFSv4 error %d\n", __func__, -err); diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 0be0277..c52e991 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -6254,7 +6254,6 @@ static struct { { NFS4ERR_DQUOT, -EDQUOT }, { NFS4ERR_STALE, -ESTALE }, { NFS4ERR_BADHANDLE, -EBADHANDLE }, - { NFS4ERR_BADOWNER, -EINVAL }, { NFS4ERR_BADNAME, -EINVAL }, { NFS4ERR_BAD_COOKIE, -EBADCOOKIE }, { NFS4ERR_NOTSUPP, -ENOTSUPP },