Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3069362ybx; Fri, 8 Nov 2019 13:34:31 -0800 (PST) X-Google-Smtp-Source: APXvYqxyeKt+GRMceIhMlNnKtLybf27AclT8vkoWiLKIvSagmEcf1cevs0vMGPLJW4+qhlJLuv3M X-Received: by 2002:a17:907:447b:: with SMTP id oo19mr10665299ejb.81.1573248871465; Fri, 08 Nov 2019 13:34:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573248871; cv=none; d=google.com; s=arc-20160816; b=N4AgK3HdSTZo7qFQXDG8qp2AS3InGFUfOnqt2SLgeVnlnSPlRIellZGhCjuGH+rhwL zg1MgS3X+tWV6IRLUJ01LzlVA3l8GblsjHN6bTVqXCp43cvEJucA92WOLni1YO6P22KK P/FQvshZmXPGFbD6TRiIoxK8oqxUlSC4lpSn+7wb3rSEpIZzBN0EWSMMcXVKpBsJveh1 1zsqJAoNUfvSzWpNCiiCqsV89W8Idv6QNVRFYHynznl9M/EMwR8HYh04CuMO/UN2wFf0 z9uxsCOEIPXglLyQVRfUGpScWtkt3ULYIdsZw/eWRBpfbUgeZJNPkvkU8AKxGsDGk8R8 LrkQ== 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=d3kn94vJyi5xurZ0SFwSo+SGQo3eNcFjJw1RuiIPnI0=; b=y3uyVewWKtJKz2Tes/jIcr/ePiqWUDMr3TXri8v/e6XI0/ULfbEliCgqHdg3OxnJ0T BlS51Sc6YAMoWvXjbaRFiObxJQg18tA1pGXb7yQWgWoH1RrWcV6Gt3FAP+tyQMVfpZbB 6HcCw9BssFvP95RD8NatTXiMq2TkjMYb9nTxVRxqcRL4Q4MdaVKIVntvKxF0Lib+c1yT chHelqWeCMmQS/jUUd8qH9iAxOkj2yNeqW4VsmBBMP9akCS0A35gIuA1UCJMklUO1GIb RMCHAqRqpFLn8dk2Dg4DU5ZFGogyIw9NzjBhX6JoJgqCrRqOQGa2FN3F08/AccUu3Dle PrPg== 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 h21si5000270edb.20.2019.11.08.13.34.08; Fri, 08 Nov 2019 13:34:31 -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 S1732671AbfKHVdk (ORCPT + 99 others); Fri, 8 Nov 2019 16:33:40 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:42255 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731601AbfKHVdk (ORCPT ); Fri, 8 Nov 2019 16:33:40 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MOzCW-1iGzco0Bwa-00PKzo; Fri, 08 Nov 2019 22:33:26 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org, Valdis Kletnieks , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , Valentin Vidic , devel@driverdev.osuosl.org Subject: [PATCH 01/16] staging: exfat: use prandom_u32() for i_generation Date: Fri, 8 Nov 2019 22:32:39 +0100 Message-Id: <20191108213257.3097633-2-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 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:0MSwPuOaQAzghrJEDyZlqv05bI/+SpkvfIU+MJ9BeKiWSPaHd0p 392UEHTrotwvsLO4OcIt/xO0Z3OGprQKX5WHtFKLoQAQpDv6I2mmSdje+gQQz74ZSiHGY0F KijxNkEpHfi8XdJMia3y2N6RpdjFbm5OKxME6GlH17dMSMZEG8jO22jb9ol3SgxZaSltt/b vN8t1LsHzkSgZ06ObIKEA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:oLz/LL5df3I=:aBRiyUF0lSDKUtt5Gjjqhy xYbnz9RoFaI1jbfsYk63+qmbpstnTAeqese/D2MfJDQTwJLcosbmet6dHm2Y2Gpctt6tZyasb Bhr6nFPe9HkBTxappYvULm/0UpzYIgfIoxW8ckQ0I8aL51oGwTCkvNucbRoZnj/wswSgOlSbQ GjWfMQFQGusbttCDtzK3ZwhozndLBxXca8ZY1usyNDycBG52rvqlCrG2526j3lriF4AXeJ9Gh vzHmF49hdGwXkqao+mG8gcyhP43N/2pSgNFuMmpyyASRYkELYohIOdIfXTcS6xcsQNyXhnDJi qEedgfwOXmQvuwLS24iB23AmHuSU3KcvqCssypdHni1Zfxp4MXrjn7emneRwS94DhYebw9q3K sdOJCZI6NOvHYQiTFYmrdMnuZeRrVu36nhH8O+xrGq0yNwk/UfIXyWGEg92hka5tIAdymYD9u du0CGF/HkHtQbpdyOxGNqxvLQHON4K1S0gcux63cdOENL+nMJmiKHxXfvZxloRvt6dLeo5XLQ lJ+cy+eklRnJhQXpPs0w1MsZY0FQYbExvxDgxEgW1rJuScpZA8450rwmGSfuIR0kKfPkm3Co/ rXk+z59Y9aHOu96JhZEI2At6n83c5rlB821oHQSjI1U045WyyPsyDd4H46clT5qMYOSpatAql ihzR2AzCw0jsMQYX7hTqKEjTAGTqM+caI5lMwkcIfnJckOsEWyRorU98zrLQmtBGGJ2WV2o+s PYevsMCDYkCC0XIRPm9KGB54XUFkkjLT4Xtt+n5P8G65pFRs9SjJ6F2j//N/I3WvejnHSRpPA kh2fSiEEPVK6jq0xaEBm5MOd58/oEayTLsEJme3KiY+oaRMngbP8kPsf2NJ1tf5MHOVVyw91I tMBd12T9KRLgVow+HOSg== 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 --- drivers/staging/exfat/exfat_super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index 3b2b0ceb7297..da76c607f589 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -26,7 +26,7 @@ #include #include #include - +#include #include #include #include @@ -3314,7 +3314,7 @@ static int exfat_fill_inode(struct inode *inode, struct file_id_t *fid) inode->i_uid = sbi->options.fs_uid; inode->i_gid = sbi->options.fs_gid; INC_IVERSION(inode); - inode->i_generation = get_seconds(); + inode->i_generation = prandom_u32(); if (info.Attr & ATTR_SUBDIR) { /* directory */ inode->i_generation &= ~1; -- 2.20.0