From patchwork Fri Apr 2 17:33:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shirish Pargaonkar X-Patchwork-Id: 90409 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 o32HabVo017347 for ; Fri, 2 Apr 2010 17:37:18 GMT Received: from fn.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id 595B6ACF41; Fri, 2 Apr 2010 11:36:38 -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 F29BAAC578 for ; Fri, 2 Apr 2010 11:36:32 -0600 (MDT) Received: by pwi2 with SMTP id 2so1792725pwi.14 for ; Fri, 02 Apr 2010 10:36:31 -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=gFeALQLtp3jeahc+s5KNRz4JPCJOFFpGvFipDfRd6uePtZ5sAJg5xSLJVqiMFniUoh rEWyZgjghk4nKwsbne+lbAlBDGRkCVXhKotL2thf2DATrVIGVZmBsdEnhTCxQ8HnR+oS 5cHJkk7/b+I5bHuI4ODIohKATaCACAj4k1sL8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=vGJxvZv4kFlr8eQ1XofGGmPeR0E48mg8LS/66IuY4O12hiYnNIe+0wPI/G8/uK2n+c 3u8EtZH9tIx4kRM5VK0ahb5uSiph7Cp7Bb4kywUdlqOKWohmGU5+Fa9V0uCyvlJnU01A 6I8a+kyRF+X964rCpw42NgAwT00dqh1Ej5nP0= Received: by 10.114.8.2 with SMTP id 2mr2484923wah.91.1270229791458; Fri, 02 Apr 2010 10:36:31 -0700 (PDT) Received: from localhost ([32.97.110.58]) by mx.google.com with ESMTPS id 21sm2068876iwn.15.2010.04.02.10.36.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 02 Apr 2010 10:36:30 -0700 (PDT) From: shirishpargaonkar@gmail.com To: linux-cifs-client@lists.samba.org Date: Fri, 2 Apr 2010 12:33:35 -0500 Message-Id: <1270229615-14253-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:37:18 +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,