From patchwork Fri Nov 8 21:32:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 178987 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3311096ilf; Fri, 8 Nov 2019 13:33:55 -0800 (PST) X-Google-Smtp-Source: APXvYqx8hNcGnBsKGHlKdyHR3DyPm2F3ZpEJB7ZoXKfMK217v5MIDovJqejFhXPtl3FN68qiQbWq X-Received: by 2002:a17:906:e0d5:: with SMTP id gl21mr10739998ejb.292.1573248835251; Fri, 08 Nov 2019 13:33:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573248835; cv=none; d=google.com; s=arc-20160816; b=QOCeXVBTWyYiPk/Xfa7GmK1gTqv4FtUvQbZrA62ZqkLkvhiYyXdT5DfAdVfOpQRZNd nirDgeYIKD0Tf6w0QqTJqaB2OVyk/NV1XuhwVqvFlGL6Xa09gV/VC4WMayoKL0Q/JQTa Y5ETFf00z0uvw2x+411+Pg+rGtHlIgYkKCLNjSql1a1Dfaxpseh0DF6DG8t4Id6ccCMI bUdD4h0gGYXrSJKnM5ttU7xwoMNTUfHGiV9T9N1CvK2IcPzUkq1UroYo9gLIlxdHOxDb tsRsDDjwziSCViZKM+tz1HJmpdUp8DvOfqHTYyWE5w+MVvTVMnHLiMsFkAED+d+L3GOF Ss+Q== 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=CyWLLTu8C7kAosa5qdYagzVZZgdXKv9QfbLHlummJbEy/AqbFTBAQoTefAOPELgNRc ZBo2I0ztdhemGBxYLVQTcTkPJujTRYbV7YAgWeZrkOgBnvJxbnWJYzkdHPzI6iADJk4I ZDdiIxCKQJFNfcRAPznYjHs6aK8W3w7GalPUP8ekPaBup5A2/wd/4llrGcAxIK/5io7A +rsZZmEsk3wrqrNnHuct8svlqmCKMEsDeM5zLvu9Zk41C5tfRWkfi7TBx5Wpn+A9DMcb 86eltVOz/JdGmAf+c7CWE+5pkYZ2Bc7ggUR75t67anhlcMdca9dueVEsNxKFFOpTmELk h0eg== 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 i10si4516219ejj.8.2019.11.08.13.33.54; Fri, 08 Nov 2019 13:33:55 -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 S1732788AbfKHVdw (ORCPT + 26 others); Fri, 8 Nov 2019 16:33:52 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:52815 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731765AbfKHVdw (ORCPT ); Fri, 8 Nov 2019 16:33:52 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MSswA-1iLzYt2E18-00UGxO; Fri, 08 Nov 2019 22:33:37 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org, OGAWA Hirofumi Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , Sergey Senozhatsky , Andrew Morton , Carmeli Tamir , Greg Kroah-Hartman , Thomas Gleixner , Al Viro , Deepa Dinamani Subject: [PATCH 02/16] fat: use prandom_u32() for i_generation Date: Fri, 8 Nov 2019 22:32:40 +0100 Message-Id: <20191108213257.3097633-3-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191108213257.3097633-1-arnd@arndb.de> References: <20191108213257.3097633-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:xyMkheBDOQ2yaVVntEHgn9uUv1eZLDi2PHuV/3eFCHO8p5lovZV RSePDEWBDJbgngLzGRALBZfJl5JOc/Jtxuyr7QiT/iBCBbjdZJGTSgC2IvsTsu/G8Wrk8Qp GiN6kRR+nPbTe/wfuUTgyPddaHuqJCxUZ4XE1/4ITyS+2pjP8u0UFcA4cFLt8YYwP57kCQJ fk91hJAfaQeU9TGvmYShw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:DJ2s+pQ7k9s=:/y5VLXzDEQnWFAeSQ6xOT6 CQnsEi8h6oR3+uq3G21bQgEahitqAHnJmT2KNTIAE8E657mVB3N+hZQ9MTvbAybhVKnqHNHNR idT/3YENYmr7+Njvqjjc5RlZUQ7KJ/Xv+472f1SMhcd4wTbzZ9Q+ZvYWq2DeXrpC93sVDUloQ I32eSBkZX/7ZdDfCUxAp0B+IIwql1HylbLmE5hP6xhaB/uFKE2x5CE9Ua89bKlPpuSBg0HWki zHAbhuWTY2ZKkVv/X0MMYPM6aKf2kNzBxAAltGfZ+eRS3mu2lwNR9W3LZZEiUUfBB7+iSfVzW /jxxhOSksfm3m7CthVRll/a6vzheR2WY6N5z2p2DsAmenRm83oq8O6BEfhrAjxj0gXmpAzR5w kraqdJ2wHUtKHYL4l5I/PgR4ZwVw6/3tEyql+pwkXSEbvxGyGWxSdpEluEBbekv2jL394ePX+ uMs9A3kzqjXQRDuahnIHfvYhfryebO84fKl/Cf6TpkqZwxIpYkK1ivI8m6E8GXYxLB8d5YhKR MAYuH+Ji89DIFPRilXJPMotaHackTxXkzFWYwbl5fO1Rr0yxPGxDzQq/DS98nCPNLFyKvhFxK HlJSfzSdE58tDYScQrsLPnu7A/z5bKPzaq3SCdjqAFtYaHj0HNAe0dOSSVfXjulvXmrGEpsMX cinqux25sQ19OjeTolQIXEge/FzmqODBKtBdAXBzhY64ukP5DvhJxTWMjNcYsylJhppWeRbmY +qRFjY/JlKmmqmFeFZGMG/qAbOSmXB16SupBJmoVWfFYh5zRUzZUrPMStqqrRK95Z0H5qj/qB g7stPBh+VKB1WFBmPVWW/pvdNqHEn/Zqhh14UaYRUD/jI6qp9qeqL+r6hhd+ITpG67/O+Hsas q+8rrmNsLbzj3POPuP2w== 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;