From patchwork Wed Jan 13 21:18:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shirish Pargaonkar X-Patchwork-Id: 72709 Received: from lists.samba.org (fn.samba.org [216.83.154.106]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0DLIqI5005202 for ; Wed, 13 Jan 2010 21:18:53 GMT Received: from fn.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id 98ACB465A0; Wed, 13 Jan 2010 14:24:45 -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 mail-pz0-f199.google.com (mail-pz0-f199.google.com [209.85.222.199]) by lists.samba.org (Postfix) with ESMTP id A5309AD0EC for ; Wed, 13 Jan 2010 14:24:39 -0700 (MST) Received: by pzk37 with SMTP id 37so14425635pzk.10 for ; Wed, 13 Jan 2010 13:18:45 -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=AqS1D7puLo/UK+tYL0reXJdfyoLsQpaXYqZIkYbC2Lc=; b=m/85XayQLyCyG3gbc5axNLwvBvPcqA21jNs1gesin5jQZZM00l3FlmCyhlOwT5oErw kXr54nRQbc0N86Jk4WzBi+nlifnIfPcuJWRpz5dMQqK5/3N2uFwBFjkGZyLyWWm5wQ2y Pu1IekmxLdOeGlPetsH5dJwyArlVMHkArw9GE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ftbhqVQJjHDHZwW8KUKhzXtoIhv0layNbSGGfXFRHo2FhbvsmknBiScrbDkE/HzxYh uX4SfGKl/P445s1SOAr9ABwSLgOg/qoIs67lfo51s27elUXHS+ivf0v6JFGwcpVjLXAa IUHCLvwk9bxFGHzDPCAEB4CYN9BpU36xei+FM= MIME-Version: 1.0 Received: by 10.114.188.21 with SMTP id l21mr3199752waf.138.1263417525190; Wed, 13 Jan 2010 13:18:45 -0800 (PST) Date: Wed, 13 Jan 2010 15:18:45 -0600 Message-ID: <4a4634331001131318w37748abbx47291060d09e2709@mail.gmail.com> From: Shirish Pargaonkar To: linux-cifs-client@lists.samba.org Subject: [linux-cifs-client] [patch] handle fs types with coarser granularity 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 diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index cf18ee7..7db26a5 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -1762,8 +1762,18 @@ cifs_setattr_unix(struct dentry *direntry, struct iattr *attrs) CIFS_MOUNT_MAP_SPECIAL_CHR); } - if (!rc) - rc = inode_setattr(inode, attrs); + if (rc) + goto out; + + rc = inode_setattr(inode, attrs); + + /* + * force revalidate when any of the times are set since some + * of the fs types do not have finer granularity timestamps + */ + if ((!rc) && (attrs->ia_valid & (ATTR_ATIME | ATTR_MTIME | ATTR_CTIME))) + cifsInode->time = 0; + out: kfree(args);