Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2809756rdb; Wed, 4 Oct 2023 12:04:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHQfyphxYRtNf/WdgQ1wYTcmLBh3JtHxFzikCASkVpZoes1jFwWzkLxr9V7iGIM6fdAc8J6 X-Received: by 2002:a05:6a21:6da9:b0:15c:cde5:fb02 with SMTP id wl41-20020a056a216da900b0015ccde5fb02mr3714685pzb.52.1696446296203; Wed, 04 Oct 2023 12:04:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696446296; cv=none; d=google.com; s=arc-20160816; b=m+nixkuUOu1NYKLq8DsyUEtOle3iDqPAkYFIY7OnV+HV3YNtFpc476uynGbMFpMyhG CU6f5PJExKuMqOv39hnfXxeigsbJQrAvTYQNHiglXy6AIChZreSI4UMbblLOkFgZvykj x0KXnP5TffU4agZ/NEbaes8TQ2anYallA9S+woNqRUJwYHpEyrjNzpIAQA4Zs9vyqjwx 6scOGT/7Vqn2p1KjLFtsPiPo0l9Q6relIVLlDt1+0ruq2zedsXB2uy5XxSZ7fQqO22qI KdXUbGEYwEsbYcmnPS73xq/72wOP/FIxYwaz3iiuSqQ+/71U8rqFOw/Q70r6vpgum2Vh Wa7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=b07Vu4EVsK4TIwARqiUIYSpZfBVxzIjWJ/Y3jcI5km4=; fh=c1hve9LK7bidUltaxotdOOkNtWZ8Drk/KOyPdUWU/OI=; b=frgQlT1hO/RQ22tdyg8TXbyBwpEyhv4yJG8EEBB5MdAmrwB/w3S4i7YAPPP0XgHhx0 zXLj1e7RRUMxddoRrBKh/a/UxFNMHt6CXgn7NSNr+TZ1KMU5/rkAU1DUyCDcErFZNGrH wJs1fNp1vv59fB93khHN2eRaOH4XO8MH6DFbAz3nH9klN1iqCwGx2tUElSQHdWaRECU/ I2lfGb8BFFFeXQFqLLp0XtGVGTRTgK+oE/AEgC9hO3m48cpZVATrDysODIdOWIvHD4oR XdkAv1o2juQsTyMzYNs00q+SIwM8aTH7qrRt2WY7r3+ax+qEoC6ata27strFfEVmTo0f Mhhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vh2AgEQT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id kr8-20020a170903080800b001c43ff69d93si3965297plb.324.2023.10.04.12.04.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 12:04:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vh2AgEQT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 4A4E580ACCDE; Wed, 4 Oct 2023 12:04:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245225AbjJDTBF (ORCPT + 99 others); Wed, 4 Oct 2023 15:01:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245005AbjJDS7H (ORCPT ); Wed, 4 Oct 2023 14:59:07 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79B5C1FD2; Wed, 4 Oct 2023 11:55:22 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB6A8C433CA; Wed, 4 Oct 2023 18:55:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696445722; bh=iyyGrxAUe096blFO1DRwsMjGFs8ZEoXIuSVblfBp4jQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Vh2AgEQT9fzJvL5UqIp8nkt0ufLRg6GqgwK2Cpzmcdaq++A9VweDpcYn8AD/Ashi2 u4TOYMgyn+aSn+2xfwh2yOyFUtvpQoAe4CLiWPm/HCgAgbVfOZ7/DrkJwjsbu/X3PE iyruKtUQaPHIwcHfpU0Pz3OOneoMe07rFE4vltcLi8mfjsQwkd6qlnWNe9c7A5RUWs tT9NSkBfApFmCZTuE5j+fLVeeTMve1AEv9ha0lTeoVJru+sxXMYL9QGf8XkpemWpUZ gRZTs7XR124n3LVjOzZIEnWbMpsoJSHmRz5ZWArVBuCqWXOOgTuH4SuRkccvxCaNRh FBO8A4eJwU22A== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 80/89] ipc: convert to new timestamp accessors Date: Wed, 4 Oct 2023 14:53:05 -0400 Message-ID: <20231004185347.80880-78-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231004185347.80880-1-jlayton@kernel.org> References: <20231004185221.80802-1-jlayton@kernel.org> <20231004185347.80880-1-jlayton@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 04 Oct 2023 12:04:34 -0700 (PDT) X-Spam-Level: ** Convert to using the new inode timestamp accessor functions. Signed-off-by: Jeff Layton --- ipc/mqueue.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/ipc/mqueue.c b/ipc/mqueue.c index ba8215ed663a..5eea4dc0509e 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -302,7 +302,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb, inode->i_mode = mode; inode->i_uid = current_fsuid(); inode->i_gid = current_fsgid(); - inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode); + simple_inode_init_ts(inode); if (S_ISREG(mode)) { struct mqueue_inode_info *info; @@ -596,7 +596,7 @@ static int mqueue_create_attr(struct dentry *dentry, umode_t mode, void *arg) put_ipc_ns(ipc_ns); dir->i_size += DIRENT_SIZE; - dir->i_mtime = dir->i_atime = inode_set_ctime_current(dir); + simple_inode_init_ts(dir); d_instantiate(dentry, inode); dget(dentry); @@ -618,7 +618,7 @@ static int mqueue_unlink(struct inode *dir, struct dentry *dentry) { struct inode *inode = d_inode(dentry); - dir->i_mtime = dir->i_atime = inode_set_ctime_current(dir); + simple_inode_init_ts(dir); dir->i_size -= DIRENT_SIZE; drop_nlink(inode); dput(dentry); @@ -657,7 +657,7 @@ static ssize_t mqueue_read_file(struct file *filp, char __user *u_data, if (ret <= 0) return ret; - inode->i_atime = inode_set_ctime_current(inode); + inode_set_atime_to_ts(inode, inode_set_ctime_current(inode)); return ret; } @@ -1163,7 +1163,7 @@ static int do_mq_timedsend(mqd_t mqdes, const char __user *u_msg_ptr, goto out_unlock; __do_notify(info); } - inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); + simple_inode_init_ts(inode); } out_unlock: spin_unlock(&info->lock); @@ -1257,7 +1257,7 @@ static int do_mq_timedreceive(mqd_t mqdes, char __user *u_msg_ptr, msg_ptr = msg_get(info); - inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); + simple_inode_init_ts(inode); /* There is now free space in queue. */ pipelined_receive(&wake_q, info); @@ -1395,7 +1395,8 @@ static int do_mq_notify(mqd_t mqdes, const struct sigevent *notification) if (notification == NULL) { if (info->notify_owner == task_tgid(current)) { remove_notification(info); - inode->i_atime = inode_set_ctime_current(inode); + inode_set_atime_to_ts(inode, + inode_set_ctime_current(inode)); } } else if (info->notify_owner != NULL) { ret = -EBUSY; @@ -1421,7 +1422,7 @@ static int do_mq_notify(mqd_t mqdes, const struct sigevent *notification) info->notify_owner = get_pid(task_tgid(current)); info->notify_user_ns = get_user_ns(current_user_ns()); - inode->i_atime = inode_set_ctime_current(inode); + inode_set_atime_to_ts(inode, inode_set_ctime_current(inode)); } spin_unlock(&info->lock); out_fput: @@ -1484,7 +1485,7 @@ static int do_mq_getsetattr(int mqdes, struct mq_attr *new, struct mq_attr *old) f.file->f_flags &= ~O_NONBLOCK; spin_unlock(&f.file->f_lock); - inode->i_atime = inode_set_ctime_current(inode); + inode_set_atime_to_ts(inode, inode_set_ctime_current(inode)); } spin_unlock(&info->lock); -- 2.41.0