From patchwork Wed Jun 25 10:59:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinglong Mee X-Patchwork-Id: 4419511 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 871F29F26E for ; Wed, 25 Jun 2014 11:00:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9C39220379 for ; Wed, 25 Jun 2014 11:00:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D4105201DD for ; Wed, 25 Jun 2014 10:59:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755411AbaFYK76 (ORCPT ); Wed, 25 Jun 2014 06:59:58 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:50030 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755372AbaFYK76 (ORCPT ); Wed, 25 Jun 2014 06:59:58 -0400 Received: by mail-pd0-f182.google.com with SMTP id y13so1508769pdi.41 for ; Wed, 25 Jun 2014 03:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=n6rTweX3EPx5ZjCyvwUURMNUiMXO2pVPNY4O+I2VXSc=; b=AyZIBiiHEZIASzoYe9VPG6KL/ttiygkYu+Lu47kJjsLqpsf0UYWvHgD1CyGCQc9oUc lKgIfm+QV+R8Mo+4SHGDE0DIq27pdJzp3F0T5ewimVS/V/66vqKsLOWBESZ+FXbaD4gO GXWUJpxDfNgxCGsIXsdwIRlJVNA0ppOQIUFGsY5LIjmnkDz5eKoVy/MXsZ14KbJg7aen 3S3666qAOwuTw34xT6tlpmOWSVFWpokRKwJ3Qmrh5U145H/E0QAvonXJM9NjrAbPaplL RMqFbQUjZjFAA2WvxUb2IcHWiO2P0lyBlN2Ep/FKxiiMIBks5qAazPxoOqzv4KCT5fO7 f9Ag== X-Received: by 10.69.26.103 with SMTP id ix7mr10092530pbd.41.1403693997557; Wed, 25 Jun 2014 03:59:57 -0700 (PDT) Received: from [192.168.0.100] ([171.215.227.43]) by mx.google.com with ESMTPSA id gi1sm4737747pbd.15.2014.06.25.03.59.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 25 Jun 2014 03:59:56 -0700 (PDT) Message-ID: <53AAAB93.9030307@gmail.com> Date: Wed, 25 Jun 2014 18:59:31 +0800 From: Kinglong Mee User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: "J. Bruce Fields" CC: Linux NFS Mailing List , kinglongmee@gmail.com Subject: [PATCH 1/4] NFSD: Fix missing reset creds in nfsd4_create_clid_dir 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, 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 Signed-off-by: Kinglong Mee --- fs/nfsd/nfs4recover.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index 9c271f4..e37ac1c 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c @@ -188,7 +188,7 @@ nfsd4_create_clid_dir(struct nfs4_client *clp) status = mnt_want_write_file(nn->rec_file); if (status) - return; + goto out_creds; dir = nn->rec_file->f_path.dentry; /* lock the parent */ @@ -228,6 +228,7 @@ out_unlock: user_recovery_dirname); } mnt_drop_write_file(nn->rec_file); +out_creds: nfs4_reset_creds(original_cred); }