From patchwork Fri Feb 5 11:39:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 8233671 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DC0C5BEEE5 for ; Fri, 5 Feb 2016 11:39:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E205520395 for ; Fri, 5 Feb 2016 11:39:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0904A20383 for ; Fri, 5 Feb 2016 11:39:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751175AbcBELjK (ORCPT ); Fri, 5 Feb 2016 06:39:10 -0500 Received: from mail-ig0-f196.google.com ([209.85.213.196]:33883 "EHLO mail-ig0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750850AbcBELjJ (ORCPT ); Fri, 5 Feb 2016 06:39:09 -0500 Received: by mail-ig0-f196.google.com with SMTP id ik10so929415igb.1; Fri, 05 Feb 2016 03:39:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=mlj0bom0G/JkiWxY0dnc5bvXp2a1c3xhcEwZze01Pv0=; b=Tg2ZyhaozJ8RNrOTqtBFpB8Cm7yFdTPKJWIB4hbEmvvMYMF9759dW9ce+4JpObiIai iAX7dyrqQbTxUOdODgXeQzLRny8mHzCchy6hhcqHmk0Mqqj6WneHyLlSk6sHlaoedvQS 4QelDuPnsgtR/l6FU5AAuZ+oyhZmrnwKNHscM8yeyqojegtO4KCw0cHiih0clZ+SJ6FU xT8nftFkyLI8/bh7Sag58XUg7TDVCaskj8yQoiPJujWimqA6AcTpN8Fzl6grVbVavk3k r95tURhk6a6STkaNXcewWXbjnRIXLenztchy8iVPEZvmaT5yaW41eflafVKFvoOQgN3x Q87g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=mlj0bom0G/JkiWxY0dnc5bvXp2a1c3xhcEwZze01Pv0=; b=iZWM3KkXdlORNmjheqiKdQ+2Aie2UTMPneE0a3SfaKqxAgbvXk+ARD+X2f/xBm8rpV Sz5jnTFY3ommqhr9NSaW56dhZTQ2gaTm57y/SfcDcba5fsHNNeeIYyxF1clhMhHi+qyq AXrnsgV88XL5muDXVK6YRCNbbO9O7oks4gb//ugzKKg9EwX6QP40gTXslrtmZYqe7vDe 8zyXkkuVNB01236VdkRHzNHlPswq27rkD6hRINe5lOO31cQY+uX6cOUprkxiJLGO+yjj 0VvdsffMgagBZJSaPHNwEGLXc2cznUqCwi2pfJSYJ/L+qZL1qa5TJ46tXzUHJMHrnQZH CvmQ== X-Gm-Message-State: AG10YOTJPOFmjNyHFj7h99jg3aEKNMJ+pq0CWuUDHgILvS8OcbVREfD069zVP1sl31Qd8deOgNaYavPsZSpAsQ== MIME-Version: 1.0 X-Received: by 10.50.160.37 with SMTP id xh5mr15223379igb.49.1454672348169; Fri, 05 Feb 2016 03:39:08 -0800 (PST) Received: by 10.107.148.202 with HTTP; Fri, 5 Feb 2016 03:39:08 -0800 (PST) In-Reply-To: <20160204141436.GB9136@twin.jikos.cz> References: <1454479670-8204-1-git-send-email-deepa.kernel@gmail.com> <1454479670-8204-11-git-send-email-deepa.kernel@gmail.com> <20160204141436.GB9136@twin.jikos.cz> Date: Fri, 5 Feb 2016 03:39:08 -0800 Message-ID: Subject: Re: [PATCH 10/10] fs: btrfs: Replace CURRENT_TIME by current_fs_time() From: Deepa Dinamani To: dsterba@suse.cz, Deepa Dinamani , linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org, Arnd Bergmann , Dave Chinner , "Theodore Ts'o" , linux-kernel@vger.kernel.org, Chris Mason , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 The kernel tester found a dereferencing NULL pointer issue with this patch. I think this is the fix: I will test and re-post the patch. -Deepa On Thu, Feb 4, 2016 at 6:14 AM, David Sterba wrote: > On Tue, Feb 02, 2016 at 10:07:50PM -0800, Deepa Dinamani wrote: >> CURRENT_TIME macro is not appropriate for filesystems as it >> doesn't use the right granularity for filesystem timestamps. >> Use current_fs_time() instead. >> >> Signed-off-by: Deepa Dinamani >> Cc: Chris Mason >> Cc: Josef Bacik >> Cc: David Sterba >> Cc: linux-btrfs@vger.kernel.org > > Reviewed-by: David Sterba > > There's no actual change for btrfs as it uses granularity 1 which is a > no-op and equivalent to CURRENT_TIME. --- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/fs/btrfs/root-tree.c +++ b/fs/btrfs/root-tree.c @@ -488,7 +488,7 @@ void btrfs_update_root_times(struct btrfs_trans_handle *trans, struct btrfs_root *root) { struct btrfs_root_item *item = &root->root_item; - struct timespec ct = current_fs_time(root->ino_cache_inode->i_sb); + struct timespec ct = current_fs_time(root->fs_info->sb);