From patchwork Fri Apr 2 17:32:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shirish Pargaonkar X-Patchwork-Id: 90408 Received: from lists.samba.org (fn.samba.org [216.83.154.106]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o32HZxwc017252 for ; Fri, 2 Apr 2010 17:36:34 GMT Received: from fn.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id 20565ACF41; Fri, 2 Apr 2010 11:36:00 -0600 (MDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on fn.samba.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.8 tests=BAYES_00,SPF_PASS autolearn=ham version=3.2.5 X-Original-To: linux-cifs-client@lists.samba.org Delivered-To: linux-cifs-client@lists.samba.org Received: from mail-pw0-f41.google.com (mail-pw0-f41.google.com [209.85.160.41]) by lists.samba.org (Postfix) with ESMTP id 1592FAC578 for ; Fri, 2 Apr 2010 11:35:54 -0600 (MDT) Received: by pwi2 with SMTP id 2so1792354pwi.14 for ; Fri, 02 Apr 2010 10:35:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=TeMj3CmhDrsnbawtoaJ9u9p1XYH0LN69q0VkIZKCEAY=; b=ga+HQwMOZF8VmFAGKnjWRnlcesBg6NB4dpGI+uIuhDqgWNv5aSH5H8XI5QkdPXgRGG 8VPtyjXwNLkQvgox/mrYvW8RcuRdgHifskTbbsbS9f72NCf6X2c0zIvOH+sSWqxhArr0 N/T4u0tgNh0bdpPAEWtL1/4pGInzsV658+0O0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=j083wILNXB+ihO7kC5YWioLagZIh68I2WRt5+lq3TZcX3CrpO4IVUP3DQ6mMj1PBD4 zkWBU8w0LQaBdLRIC9myXlg4SWUgF9ygRpPWbzVFlrywsBbdDoz05F/FbkLh/IGouKNg cr9SdAhQwUe3Jo/TRPSPIP8xGBx8YE1P50UUo= Received: by 10.143.24.17 with SMTP id b17mr873342wfj.317.1270229753290; Fri, 02 Apr 2010 10:35:53 -0700 (PDT) Received: from localhost ([32.97.110.58]) by mx.google.com with ESMTPS id 21sm2063580iwn.11.2010.04.02.10.35.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 02 Apr 2010 10:35:52 -0700 (PDT) From: shirishpargaonkar@gmail.com To: linux-cifs-client@lists.samba.org Date: Fri, 2 Apr 2010 12:32:58 -0500 Message-Id: <1270229578-14227-1-git-send-email-shirishpargaonkar@gmail.com> X-Mailer: git-send-email 1.6.0.2 Cc: smfrench@gmail.com Subject: [linux-cifs-client] [patch] skip posix open if nameidata is null X-BeenThere: linux-cifs-client@lists.samba.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: The Linux CIFS VFS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-cifs-client-bounces@lists.samba.org Errors-To: linux-cifs-client-bounces@lists.samba.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 02 Apr 2010 17:36:35 +0000 (UTC) diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index e9f7ecc..eef8d83 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -317,7 +317,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, else oflags = FMODE_READ; - if (tcon->unix_ext && (tcon->ses->capabilities & CAP_UNIX) && + if (nd && tcon->unix_ext && (tcon->ses->capabilities & CAP_UNIX) && (CIFS_UNIX_POSIX_PATH_OPS_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability))) { rc = cifs_posix_open(full_path, &newinode, nd->path.mnt,