From patchwork Fri Jul 13 07:53:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 1194121 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 153D33FC4C for ; Fri, 13 Jul 2012 07:55:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754941Ab2GMHzY (ORCPT ); Fri, 13 Jul 2012 03:55:24 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:49057 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754919Ab2GMHzY (ORCPT ); Fri, 13 Jul 2012 03:55:24 -0400 Received: by mail-lb0-f174.google.com with SMTP id gm6so5433132lbb.19 for ; Fri, 13 Jul 2012 00:55:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=ttobR73ByvWAGGknio5Gq0fXGxjtUeXim8j4q4GoHM4=; b=xeFnPq0HSJJsTk5d9vyi35mZs3o2k1LYEBRKIedCmtBnnfm9PnRhEssx+G1s1PFlKJ tgGmT8z/hfd9IEvNPOQs48m388mzgNi/uOPS5Lv7fLtPclJy15DiTUNlAQd+rbh7Lpzr 0t/dQxgwI1PLAVTC3bKc9rQSC1HhluSxCpZbMWjQjDWpj2OKULGt/493V1N6zqt8Ch0p QHGSbZU6CdJlRazmwjmj869F2APm8qRmWopqm5KkgHoDe0xzst1TOJeyUEjLHSdd32jh 2D1YMtVUNmONmA0egnplyY9M2WTH48USEabEeUqYEC8XEGWBi3bUAgzART81/nM7y2ou dFMg== Received: by 10.152.131.68 with SMTP id ok4mr102137lab.47.1342166123525; Fri, 13 Jul 2012 00:55:23 -0700 (PDT) Received: from localhost.localdomain ([178.45.132.158]) by mx.google.com with ESMTPS id er3sm1595545lbb.16.2012.07.13.00.55.21 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Jul 2012 00:55:22 -0700 (PDT) From: Pavel Shilovsky To: linux-cifs@vger.kernel.org Subject: [PATCH v3 12/32] CIFS: Fix a wrong pointer in atomic_open Date: Fri, 13 Jul 2012 11:53:25 +0400 Message-Id: <1342166025-29377-13-git-send-email-pshilovsky@samba.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1342166025-29377-1-git-send-email-pshilovsky@samba.org> References: <1342166025-29377-1-git-send-email-pshilovsky@samba.org> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Commit 8ce5c35dd353cbf533383c54dca8aa7d2da6950f caused a regression in cifs open codepath. Signed-off-by: Pavel Shilovsky Reviewed-by: Jeff Layton Reviewed-by: Jeff Layton --- fs/cifs/dir.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index d364654..2caba0b 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -387,7 +387,6 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry, struct cifs_tcon *tcon; __u16 fileHandle; __u32 oplock; - struct file *filp; struct cifsFileInfo *pfile_info; /* Posix open is only called (at lookup time) for file create now. For @@ -418,7 +417,6 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry, inode, direntry->d_name.name, direntry); tlink = cifs_sb_tlink(CIFS_SB(inode->i_sb)); - filp = ERR_CAST(tlink); if (IS_ERR(tlink)) goto out_free_xid; @@ -436,10 +434,9 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry, goto out; } - pfile_info = cifs_new_fileinfo(fileHandle, filp, tlink, oplock); + pfile_info = cifs_new_fileinfo(fileHandle, file, tlink, oplock); if (pfile_info == NULL) { CIFSSMBClose(xid, tcon, fileHandle); - fput(filp); rc = -ENOMEM; }