From patchwork Wed Mar 10 18:49:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shirish Pargaonkar X-Patchwork-Id: 84671 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 o2AInK0T005593 for ; Wed, 10 Mar 2010 18:49:55 GMT Received: from fn.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id 623A0AD1B8; Wed, 10 Mar 2010 11:49:22 -0700 (MST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on fn.samba.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.8 tests=AWL,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 qw-out-1920.google.com (qw-out-1920.google.com [74.125.92.146]) by lists.samba.org (Postfix) with ESMTP id 89A93ACF4D for ; Wed, 10 Mar 2010 11:49:16 -0700 (MST) Received: by qw-out-1920.google.com with SMTP id 14so2159939qwa.14 for ; Wed, 10 Mar 2010 10:49:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=iV3EFJpGL2g9PCOYGP4iZAwK4p0fUkYk/8pM9F/UVzg=; b=u5a8Z01jV5CqTiYZn8MBSl2lZ50NTb8r6HW53kfubqm3X6rjT9xKPo8EHmFRUU5pBD y9RKl6J0+0PafnQ4bxMLnZ1xx30O9/aaJKEZSAJ+4DWiihTGh6K/TVtXA7i6X03CvlRp OUM3R3BcJHnGz9PZJsCYgiDAQ5RvkZwLzWdhA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=YB+HmMwlky6ilFWUJ0FhEecDYzQJoSjT8Gjq3DQis4il5OFD3Ay+8tw2O52VI6Vf2O 57Nl/VAixB1cXaIK1V7qVV1Z2jyL4cMuQzBdNE9Vns99KpMWkJHCTPFRw6InYtbChV3M rCJ53n5QzY1MtqqXcfoMCMLKDYKgti6kzH7f8= MIME-Version: 1.0 Received: by 10.220.107.4 with SMTP id z4mr106697vco.147.1268246952840; Wed, 10 Mar 2010 10:49:12 -0800 (PST) Date: Wed, 10 Mar 2010 12:49:12 -0600 Message-ID: <4a4634331003101049n242cf6e4kd992101ff239a265@mail.gmail.com> From: Shirish Pargaonkar To: linux-cifs-client@lists.samba.org, Steve French Subject: [linux-cifs-client] [patch] remove redundant check for file's private_data 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: , 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]); Wed, 10 Mar 2010 18:49:55 +0000 (UTC) diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index c343b14..e8a7794 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c @@ -812,11 +812,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) return rc; } } - if (file->private_data == NULL) { - rc = -EINVAL; - FreeXid(xid); - return rc; - } + cifsFile = file->private_data; if (cifsFile->srch_inf.endOfSearch) {