From patchwork Thu Jun 26 19:11:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 4430141 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 59B82BEEAA for ; Thu, 26 Jun 2014 19:13:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9899C2024D for ; Thu, 26 Jun 2014 19:13:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BC568201BB for ; Thu, 26 Jun 2014 19:13:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751403AbaFZTNv (ORCPT ); Thu, 26 Jun 2014 15:13:51 -0400 Received: from mail-qg0-f53.google.com ([209.85.192.53]:64580 "EHLO mail-qg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751189AbaFZTNu (ORCPT ); Thu, 26 Jun 2014 15:13:50 -0400 Received: by mail-qg0-f53.google.com with SMTP id i50so3414165qgf.26 for ; Thu, 26 Jun 2014 12:13:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=gLRbbyHxEdYrhPbLfCmPqGX+GEeR+mTXRfir3iL7Hc0=; b=a89T34pD6UB0e9gZC38KVUaCYYUG/gwzLYZQAVZDXsIZQ8rafqLLVv2lw7sbdSzhnD u6S4IBw8nhUQLwSne1jFPd8rVgAE18KWCxDrT5ZcBB2zWKldWFfBaDl8pGHvcW9labYY IvdxFmpGG6bHbMmPT+7AXQZvlms6+bpvCrE96mhpZncbj5bKqwbVPiobXTxVpz7pRuPL rwzMaonT56A4lfybapNnaFurZAVvKXzXl0H79oVxM70Htz9g9JQXkVd50iobyD+qzYws BWQpUj6VonpiPEiqcpp1WdXum4/nPwSVNcSsnlFzDWpCEwLr4u2yvDJsAeHZp1kZQtlA hQuA== X-Gm-Message-State: ALoCoQlnXq8zmJV3V//1QCqZ5G1Dy1frnwd/RoAqtoxVn5qUpkBD5awpesXFdvY+wz0hMkqsZUGI X-Received: by 10.224.98.197 with SMTP id r5mr20487474qan.57.1403810029458; Thu, 26 Jun 2014 12:13:49 -0700 (PDT) Received: from tlielax.poochiereds.net ([2001:470:8:d63:3a60:77ff:fe93:a95d]) by mx.google.com with ESMTPSA id 88sm4763039qgh.5.2014.06.26.12.13.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jun 2014 12:13:48 -0700 (PDT) From: Jeff Layton To: bfields@fieldses.org Cc: linux-nfs@vger.kernel.org Subject: [PATCH v2 002/117] nfsd: fix return of nfs4_acl_write_who Date: Thu, 26 Jun 2014 15:11:42 -0400 Message-Id: <1403810017-16062-3-git-send-email-jlayton@primarydata.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1403810017-16062-1-git-send-email-jlayton@primarydata.com> References: <1403810017-16062-1-git-send-email-jlayton@primarydata.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP AFAICT, the only way to hit this error is to pass this function a bogus "who" value. In that case, we probably don't want to return -1 as that could get sent back to the client. Turn this into nfserr_serverfault, which is a more appropriate error for a server bug like this. Reviewed-by: Christoph Hellwig Signed-off-by: Jeff Layton --- fs/nfsd/nfs4acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c index d714156a19fd..b0cf00d3ee7d 100644 --- a/fs/nfsd/nfs4acl.c +++ b/fs/nfsd/nfs4acl.c @@ -935,5 +935,5 @@ __be32 nfs4_acl_write_who(struct xdr_stream *xdr, int who) return 0; } WARN_ON_ONCE(1); - return -1; + return nfserr_serverfault; }