From patchwork Tue Nov 25 07:52:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namjae Jeon X-Patchwork-Id: 5373531 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C578DC11AC for ; Tue, 25 Nov 2014 07:53:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 12B812021F for ; Tue, 25 Nov 2014 07:53:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D352201EC for ; Tue, 25 Nov 2014 07:52:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752939AbaKYHww (ORCPT ); Tue, 25 Nov 2014 02:52:52 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:10407 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752933AbaKYHwu (ORCPT ); Tue, 25 Nov 2014 02:52:50 -0500 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NFL00KMN4K0P650@mailout3.samsung.com> for linux-cifs@vger.kernel.org; Tue, 25 Nov 2014 16:52:48 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.112]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 48.EF.11124.05534745; Tue, 25 Nov 2014 16:52:48 +0900 (KST) X-AuditID: cbfee68e-f79b46d000002b74-12-547435505a1b Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id E3.9E.09430.05534745; Tue, 25 Nov 2014 16:52:48 +0900 (KST) Received: from DONAMJAEJEO06 ([10.88.104.63]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NFL00JKZ4K0KF30@mmp1.samsung.com>; Tue, 25 Nov 2014 16:52:48 +0900 (KST) From: Namjae Jeon To: Steve French Cc: linux-cifs@vger.kernel.org, Ashish Sangwan Subject: [PATCH 1/2] cifs: remove unneeded condition check Date: Tue, 25 Nov 2014 16:52:48 +0900 Message-id: <001201d00884$ce584120$6b08c360$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AdAIg3ZhjxcSL9zMSuuHmtF3EVqwGA== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplkeLIzCtJLcpLzFFi42JZI2JSoBtgWhJi8Oq4ocXSiZeYLV7838Vs 8ebFYTYHZo+ds+6ye/RtWcXo8XmTXABzFJdNSmpOZllqkb5dAlfGrP98BdvYKi5NnsrUwLiY tYuRk0NCwERi0+lORghbTOLCvfVsXYxcHEICSxkl/m7cyARTNPvVVnaIxCJGicWtjSwQzl9G iX+TnwE5HBxsAtoSf7aIgjSICKhKvGueygxiMwu4Sbx//ZsVpERYwEpi+xcOEJMFqGTWmjIQ k1fAUuJ/UxhIMa+AoMSPyfdYIBq1JNbvPM4EYctLbF7zlhniGgWJHWdfM0Is0pNY27WeEaJG RGLfi3eMIIdJCMxjl1hwZwE7SIJFQEDi2+RDYEdKCMhKbDoANUdS4uCKGywTGMVmIVk9C8nq WUhWz0KyYgEjyypG0dSC5ILipPQiI73ixNzi0rx0veT83E2MwFg6/e9Z3w7GmwesDzEKcDAq 8fB2nC0OEWJNLCuuzD3EaAp00URmKdHkfGDE5pXEGxqbGVmYmpgaG5lbmimJ8yZI/QwWEkhP LEnNTk0tSC2KLyrNSS0+xMjEwSnVwD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LP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP file->private_data can never be null after calling initiate_cifs_search. So private null check condition is not needed. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- fs/cifs/readdir.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index d116ca8..8eaf20a 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c @@ -794,10 +794,6 @@ int cifs_readdir(struct file *file, struct dir_context *ctx) if it before then restart search if after then keep searching till find it */ - if (file->private_data == NULL) { - rc = -EINVAL; - goto rddir2_exit; - } cifsFile = file->private_data; if (cifsFile->srch_inf.endOfSearch) { if (cifsFile->srch_inf.emptyDir) {