From patchwork Tue Dec 7 02:07:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 381022 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 oB727dNT031042 for ; Tue, 7 Dec 2010 02:07:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754191Ab0LGCHj (ORCPT ); Mon, 6 Dec 2010 21:07:39 -0500 Received: from mail-yw0-f46.google.com ([209.85.213.46]:57493 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754148Ab0LGCHj (ORCPT ); Mon, 6 Dec 2010 21:07:39 -0500 Received: by ywl5 with SMTP id 5so6406153ywl.19 for ; Mon, 06 Dec 2010 18:07:39 -0800 (PST) Received: by 10.100.173.20 with SMTP id v20mr4484804ane.145.1291687658999; Mon, 06 Dec 2010 18:07:38 -0800 (PST) Received: from salusa.poochiereds.net (cpe-071-070-153-003.nc.res.rr.com [71.70.153.3]) by mx.google.com with ESMTPS id c39sm6123289anc.1.2010.12.06.18.07.37 (version=SSLv3 cipher=RC4-MD5); Mon, 06 Dec 2010 18:07:38 -0800 (PST) From: Jeff Layton To: smfrench@gmail.com Cc: robbert@exx.nl, linux-cifs@vger.kernel.org Subject: [PATCH] cifs: fix check of error return from is_path_accessable Date: Mon, 6 Dec 2010 21:07:33 -0500 Message-Id: <1291687653-23824-2-git-send-email-jlayton@redhat.com> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1291687653-23824-1-git-send-email-jlayton@redhat.com> References: <1291687653-23824-1-git-send-email-jlayton@redhat.com> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@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, 07 Dec 2010 02:07:40 +0000 (UTC) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 0a203ec..cc1a860 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2839,7 +2839,7 @@ remote_path_check: goto mount_fail_check; } rc = is_path_accessible(xid, tcon, cifs_sb, full_path); - if (rc != -EREMOTE) { + if (rc != 0 && rc != -EREMOTE) { kfree(full_path); goto mount_fail_check; }