From patchwork Wed Oct 27 11:50:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 285542 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 o9RBobKq001347 for ; Wed, 27 Oct 2010 11:50:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754445Ab0J0Luh (ORCPT ); Wed, 27 Oct 2010 07:50:37 -0400 Received: from mail.pripojeni.net ([217.66.174.14]:45688 "EHLO smtp.pripojeni.net" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1755194Ab0J0Lug (ORCPT ); Wed, 27 Oct 2010 07:50:36 -0400 Received: from localhost.localdomain ([217.66.174.142]) by smtp.pripojeni.net (Kerio Connect 7.1.1); Wed, 27 Oct 2010 13:50:21 +0200 From: Jiri Slaby To: sfrench@samba.org Cc: linux-kernel@vger.kernel.org, jirislaby@gmail.com, linux-cifs@vger.kernel.org Subject: [PATCH 2/4] FS: cifs, remove unneeded NULL tests Date: Wed, 27 Oct 2010 13:50:20 +0200 Message-Id: <1288180220-19869-1-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 1.7.3.1 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]); Wed, 27 Oct 2010 11:50:38 +0000 (UTC) diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 45af003..db7eaf7 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -1031,7 +1031,7 @@ ssize_t cifs_user_write(struct file *file, const char __user *write_data, cifs_stats_bytes_written(pTcon, total_written); /* since the write may have blocked check these pointers again */ - if ((file->f_path.dentry) && (file->f_path.dentry->d_inode)) { + if (file->f_path.dentry->d_inode) { struct inode *inode = file->f_path.dentry->d_inode; /* Do not update local mtime - server will set its actual value on write * inode->i_ctime = inode->i_mtime = diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c index 077bf75..2fa22f2 100644 --- a/fs/cifs/ioctl.c +++ b/fs/cifs/ioctl.c @@ -63,8 +63,6 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) #ifdef CONFIG_CIFS_POSIX case FS_IOC_GETFLAGS: if (CIFS_UNIX_EXTATTR_CAP & caps) { - if (pSMBFile == NULL) - break; rc = CIFSGetExtAttr(xid, tcon, pSMBFile->netfid, &ExtAttrBits, &ExtAttrMask); if (rc == 0) @@ -80,8 +78,6 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) rc = -EFAULT; break; } - if (pSMBFile == NULL) - break; /* rc= CIFSGetExtAttr(xid,tcon,pSMBFile->netfid, extAttrBits, &ExtAttrMask);*/ }