From patchwork Fri Aug 22 09:32:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 4762521 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 C08E4C0338 for ; Fri, 22 Aug 2014 09:34:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 14005201BB for ; Fri, 22 Aug 2014 09:34:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 30F562018A for ; Fri, 22 Aug 2014 09:34:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752205AbaHVJeS (ORCPT ); Fri, 22 Aug 2014 05:34:18 -0400 Received: from mail-la0-f48.google.com ([209.85.215.48]:34874 "EHLO mail-la0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752114AbaHVJeR (ORCPT ); Fri, 22 Aug 2014 05:34:17 -0400 Received: by mail-la0-f48.google.com with SMTP id gl10so9855563lab.35 for ; Fri, 22 Aug 2014 02:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=YEyij0034nXymOj5mIUQ2vcwHP0HO5sYqK0h5mvO2Ew=; b=yb0bq6iPVW/iSi3aJfNF0QTHjU7zNleDXKv4lQZTThp/ZDgzPoeaDexpSiSHoRjJvQ dBJTNw6WmEJ/AfhTpR71otMgbHgfypcmBwrwrwsDlBteRHw2hfR9oYKS81nTMrrVfmHg 2q8AIEz+sAjXMTMSpdub7uE//nLPG4H+iny8X0j0STdGitXDjl6CIWRtAMA295hYPQVZ 7TVGW7JFJFp0GokEyNnoYdTRwNhL91PrQ/dFxFFjZMzbWrzRRCuJJUJExRHOvtCeSXsJ 0oIdox4hT4ZLdEII16zW2zcviFW8uwc4phgPlMHN7qCw9zw2MrrD9UVb1LUw7T+QiyA6 m3AA== X-Received: by 10.152.44.129 with SMTP id e1mr1377407lam.91.1408700056106; Fri, 22 Aug 2014 02:34:16 -0700 (PDT) Received: from localhost.localdomain ([85.26.164.242]) by mx.google.com with ESMTPSA id kc1sm20752571lbc.35.2014.08.22.02.34.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Aug 2014 02:34:15 -0700 (PDT) From: Pavel Shilovsky To: linux-cifs@vger.kernel.org Cc: Subject: [PATCH 2/3] CIFS: Fix wrong restart readdir for SMB1 Date: Fri, 22 Aug 2014 13:32:10 +0400 Message-Id: <1408699931-22515-3-git-send-email-pshilovsky@samba.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1408699931-22515-1-git-send-email-pshilovsky@samba.org> References: <1408699931-22515-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 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_WEB,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 The existing code calls server->ops->close() that is not right. This causes XFS test generic/310 to fail. Fix this by using server->ops->closedir() function. Cc: # v3.7+ Signed-off-by: Pavel Shilovsky --- fs/cifs/readdir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 798c80a..58e413c 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c @@ -597,7 +597,7 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos, cfile->invalidHandle = true; spin_unlock(&cifs_file_list_lock); if (server->ops->close) - server->ops->close(xid, tcon, &cfile->fid); + server->ops->close_dir(xid, tcon, &cfile->fid); } else spin_unlock(&cifs_file_list_lock); if (cfile->srch_inf.ntwrk_buf_start) {