From patchwork Wed Aug 6 11:15:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 4684851 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 55B569F373 for ; Wed, 6 Aug 2014 11:15:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5C5D620123 for ; Wed, 6 Aug 2014 11:15:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 28233200E8 for ; Wed, 6 Aug 2014 11:15:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755143AbaHFLPy (ORCPT ); Wed, 6 Aug 2014 07:15:54 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:48465 "EHLO mail-lb0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754828AbaHFLPx (ORCPT ); Wed, 6 Aug 2014 07:15:53 -0400 Received: by mail-lb0-f169.google.com with SMTP id s7so1781994lbd.14 for ; Wed, 06 Aug 2014 04:15:52 -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; bh=66EdFAGFAX4XwASYCCn0ip6d1fpcY9/xFgBjBiL0+MU=; b=ctVYCEUAQ1IRWAowAtCymHJM6omzUDakCNjQvuG+UloTKNG/ausOYrgL3h7eHLvXpm DPqcvMgDQxicblE27zR6dFA3KMB6Xg+Z4cC9W+vNjGkJZMpWH9bRBA6lK4EJK6CnVNkT G9z2pUKlMxFECbd9zt2oEsyd8b9DK8HfTZTXck3pZNZfsXzUgUgJVoHsCEBorIzb1ePX aD+cfYIsp+EgH2FENTBGD0nYI/+KAL6DAT0k85UMRphh3eG+mCK62bdM9j25soA2oVCL slLjgm7V1FVAahJmNXDBqWl8P3RsaVwhluphGpmo2gAvwFmVo84YybdP1JIXqpFUK13/ PRIQ== X-Received: by 10.152.243.43 with SMTP id wv11mr10733468lac.52.1407323751845; Wed, 06 Aug 2014 04:15:51 -0700 (PDT) Received: from localhost.localdomain ([92.43.3.121]) by mx.google.com with ESMTPSA id dk3sm349191lad.25.2014.08.06.04.15.49 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Aug 2014 04:15:50 -0700 (PDT) From: Pavel Shilovsky To: linux-cifs@vger.kernel.org Cc: Jeff Layton Subject: [PATCH] CIFS: Update CreationTime on every query info request Date: Wed, 6 Aug 2014 15:15:43 +0400 Message-Id: <1407323743-12381-1-git-send-email-pshilovsky@samba.org> X-Mailer: git-send-email 1.8.1.2 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 Samba server can change a creation time of an inode in the default configuration. The client sets this value during the inode initialization only and uses it the inode search. In this case harlinked dentries may link to different inodes. As the results the Cthon basic test #7 fails on nounix Samba mounts. Fix this by making the client update the creation time on every query info request. Cc: Jeff Layton Signed-off-by: Pavel Shilovsky --- fs/cifs/inode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index a174605..2029e7c 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -173,6 +173,9 @@ cifs_fattr_to_inode(struct inode *inode, struct cifs_fattr *fattr) cifs_i->cifsAttrs = fattr->cf_cifsattrs; + /* Samba server changes this value in the default configuration */ + cifs_i->createtime = fattr->cf_createtime; + if (fattr->cf_flags & CIFS_FATTR_NEED_REVAL) cifs_i->time = 0; else