/* some applications poll for the file length in this strange
                   way so we must seek to end on non-oplocked files by
                   setting the revalidate time to zero */
-               if(file->f_path.dentry->d_inode)                
-                       CIFS_I(file->f_path.dentry->d_inode)->time = 0;
+               CIFS_I(file->f_path.dentry->d_inode)->time = 0;
 
                retval = cifs_revalidate(file->f_path.dentry);
                if (retval < 0)
 
        int xid, long_op;
        struct cifsFileInfo *open_file;
 
-       if (file->f_path.dentry == NULL)
-               return -EBADF;
-
        cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
-       if (cifs_sb == NULL)
-               return -EBADF;
 
        pTcon = cifs_sb->tcon;
 
 
        if (file->private_data == NULL)
                return -EBADF;
-       else
-               open_file = (struct cifsFileInfo *) file->private_data;
+       open_file = (struct cifsFileInfo *) file->private_data;
        
        xid = GetXid();
-       if (file->f_path.dentry->d_inode == NULL) {
-               FreeXid(xid);
-               return -EBADF;
-       }
 
        if (*poffset > file->f_path.dentry->d_inode->i_size)
                long_op = 2; /* writes past end of file can take a long time */
        int xid, long_op;
        struct cifsFileInfo *open_file;
 
-       if (file->f_path.dentry == NULL)
-               return -EBADF;
-
        cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
-       if (cifs_sb == NULL)
-               return -EBADF;
 
        pTcon = cifs_sb->tcon;
 
 
        if (file->private_data == NULL)
                return -EBADF;
-       else
-               open_file = (struct cifsFileInfo *)file->private_data;
+       open_file = (struct cifsFileInfo *)file->private_data;
        
        xid = GetXid();
-       if (file->f_path.dentry->d_inode == NULL) {
-               FreeXid(xid);
-               return -EBADF;
-       }
 
        if (*poffset > file->f_path.dentry->d_inode->i_size)
                long_op = 2; /* writes past end of file can take a long time */
                                        return -EBADF;
                        }
                        if (open_file->invalidHandle) {
-                               if ((file->f_path.dentry == NULL) ||
-                                  (file->f_path.dentry->d_inode == NULL)) {
-                                       FreeXid(xid);
-                                       return total_written;
-                               }
                                /* we could deadlock if we called
                                   filemap_fdatawait from here so tell
                                   reopen_file not to flush data to 
 
        cifsFile->invalidHandle = TRUE;
        cifsFile->srch_inf.endOfSearch = FALSE;
 
-       if(file->f_path.dentry == NULL)
-               return -ENOENT;
-
        cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
        if(cifs_sb == NULL)
                return -EINVAL;
    whether we can use the cached search results from the previous search */
 static int is_dir_changed(struct file * file)
 {
-       struct inode * inode;
-       struct cifsInodeInfo *cifsInfo;
-
-       if(file->f_path.dentry == NULL)
-               return 0;
-
-       inode = file->f_path.dentry->d_inode;
-
-       if(inode == NULL)
-               return 0;
-
-       cifsInfo = CIFS_I(inode);
+       struct inode *inode = file->f_path.dentry->d_inode;
+       struct cifsInodeInfo *cifsInfo = CIFS_I(inode);
 
-       if(cifsInfo->time == 0)
+       if (cifsInfo->time == 0)
                return 1; /* directory was changed, perhaps due to unlink */
        else
                return 0;
        if((scratch_buf == NULL) || (pfindEntry == NULL) || (pCifsF == NULL))
                return -ENOENT;
 
-       if(file->f_path.dentry == NULL)
-               return -ENOENT;
-
        rc = cifs_entry_is_dot(pfindEntry,pCifsF);
        /* skip . and .. since we added them first */
        if(rc != 0) 
 
        xid = GetXid();
 
-       if(file->f_path.dentry == NULL) {
-               FreeXid(xid);
-               return -EIO;
-       }
-
        cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
        pTcon = cifs_sb->tcon;
        if(pTcon == NULL)