From patchwork Fri Dec 13 20:49:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 181580 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp1141748ile; Fri, 13 Dec 2019 12:51:20 -0800 (PST) X-Google-Smtp-Source: APXvYqwB3J3dXoSkGjaa7jh3lGLd9jDG1/Fn9y9cAQgPXcwBr9fM44yC9Jn/g95WRQiaYI6bOC0o X-Received: by 2002:a05:6830:1bf1:: with SMTP id k17mr16490934otb.101.1576270280672; Fri, 13 Dec 2019 12:51:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576270280; cv=none; d=google.com; s=arc-20160816; b=UeIuQy/HB25BWKUVWYfc8jUgQ8QdDE3wBoPcV3VIM/eRbZ9oXAxuBcurSObgdA6R3F cQahI8kQQ0F4g1sGiDE8qICFoAlPox/+KU5ikN7YME0bxan8ZVlnMPxfCR9+UMhEdn75 LWVlgS7pTg6P8pFtHqVVafsEDM+hf/W77Tgu7CDsjLDtA6Q9fd30QBDTWxt83W9soUu+ F//bpezW1NWpd8e8gHgV9U2BfN8N5lWbBlAt6WazXOVsP1I6o7uI4K8cGxqqXhZf08Aw ewC3e3sysVnaYkle8MAkB39swcho0YEiTCruemRl4XRR+bxMWGRT4Hf1PUMuZbueY12x lD6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=hiZPdEQwSVnPES5BzgB7DrGPJq+0YozuFyAoOABELVY=; b=Md2R45SQUUbGEMbZpUIeTBo2WS7/Yz86Vk4O3ReF5+jp++IwBWKAG/gH7coH6UqkoO qg2HNqopTMYCVeyXOQeEQQNszf9yoE5XWtNFjK9+rF0sbrBnyBKDs4TQkaxgoCkPHIsX ykOwtq24Z1UAGY81vET2kgj/7IGqPZevnbbZYZW58XO2AUYFGOeikGRUr8EQEx26RYmk M9dVuPnukWufAd+546Lm7Ege6H2tDrr7yQJmnPGvUwfsogv74Hq3sYwznk8y1HYjt6WT 86ZJ87BvkJGHQe8oXtNTYkfu36w7bA1Rd9XENqt93Naeg9fS0T5zXir+bVCPy+2yy3Tq l8SA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l12si5856034otj.30.2019.12.13.12.51.20; Fri, 13 Dec 2019 12:51:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726708AbfLMUvT (ORCPT + 27 others); Fri, 13 Dec 2019 15:51:19 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:52363 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725747AbfLMUvT (ORCPT ); Fri, 13 Dec 2019 15:51:19 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MbAYo-1i8iwY0uVc-00bePy; Fri, 13 Dec 2019 21:51:02 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org, linux-kernel@vger.kernel.org, OGAWA Hirofumi Cc: Arnd Bergmann , Carmeli Tamir , Andrew Morton , Sergey Senozhatsky , Al Viro , Thomas Gleixner , Deepa Dinamani Subject: [PATCH v2 02/24] fat: use prandom_u32() for i_generation Date: Fri, 13 Dec 2019 21:49:11 +0100 Message-Id: <20191213204936.3643476-3-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191213204936.3643476-1-arnd@arndb.de> References: <20191213204936.3643476-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:xom8Rv0Mro1nWgzFI7iwDzUBn2boE9thbAKykOAb1L7RRT/epwZ VtM23PMG6pgOlizw3iul83/tWNKoG5HNRt2I+9OXTnAPKKtbuCDdVXh2UDdHxO2S/xIbgzW 4+mc4R/82Uw/PvlQTQMe+S+3ilRTJvxa6AUa/tfMQHTuafSdfF/5NUHHtM1MGAUJw8gsQIs UxGzoDSg1FQTzfyIq7PSw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:W5FzphDL8cs=:g7EVKCCCGWuKFtKBRF9gl8 9ubOMCgpBznyRwkBiOr7kw4trZ5LWiLLP9bjkAkR2VaRCdGETpAfxLZfkex3O0CdFNJqjCEtV 7/zVz49UECoZLXBZvVjv5W+fLnyFepmJiw+iX3TTnY2anXbDyEyi4qBOIauLeMtrS/LOtjIrB vjBjzgmCqSl5CliXferQgt83CkH8JlEIxHKb9lpp7JM3tKpYsbGjfD1gT239kNx5QVETRORPt +MCvYOTgSaAhzVhDOBUEfZdMgJ0yX1Ub6IKdz+SEh5vpKDLkbe94yWNIhgyeV7/tiZzzimPEt l7JpAZGx0bonISGsSi/j+cZX/HxM9PvzXnd9aBywC+Axz/Is45PP+jRQB8eiPLS186foq688+ pc1Z9yU7EDdfUOKBLDc+rzNuJqibKATkixOCW5/2NEhjxiq+RLwEHuA82neI5PN2YPj++T++P KJ9EcWJ1deS52sKQB+rni8OWDhQFbxnK75aicnSWhRVMbC0i+1uSnBA5AW7KPVv6qrC5Qpu0o rr0JynSM/wOH+Ka5BgbF5fKzCKgEkk8/h32wVFvVN4NVGG/3p14B0Va34OtAvTZc91hnqxshG 6fZFZI1nc7qtGAwT8Ky60OSq5IXiJMkRJWjYgH80WjZRi9s8RWI4t00jbblBDF8TsdMJppCIb 8f0aS+NQHjiSTSmPZY0Prio7a3FiAOFz5xJk1aqUcPIwyhuevd+QmNjPlsUXEI6YxM+KgoUB1 axsNHR6KqKYpLnwS3Er0g1SM+D2d5AuyYn2cJzrnauWBysHSs6F74qYdUHa3KlVX9K0WyPNHh mN+q5uTRENovsB9aa6ET4aibHQ6iFTEN6vVfVgwkmxAZ0cVYBM9SXjZM9cTwAR3YifnyK8NMO tBIWDES2L1KyB7GHSA+w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Similar to commit 46c9a946d766 ("shmem: use monotonic time for i_generation") we should not use the deprecated get_seconds() interface for i_generation. prandom_u32() is the replacement used in other file systems. Signed-off-by: Arnd Bergmann --- fs/fat/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.20.0 diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 5f04c5c810fb..594b05ae16c9 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include "fat.h" @@ -521,7 +522,7 @@ int fat_fill_inode(struct inode *inode, struct msdos_dir_entry *de) inode->i_uid = sbi->options.fs_uid; inode->i_gid = sbi->options.fs_gid; inode_inc_iversion(inode); - inode->i_generation = get_seconds(); + inode->i_generation = prandom_u32(); if ((de->attr & ATTR_DIR) && !IS_FREE(de->name)) { inode->i_generation &= ~1;