From patchwork Tue Jun 20 11:32:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13285722 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80BF1EB64D7 for ; Tue, 20 Jun 2023 11:32:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230399AbjFTLct (ORCPT ); Tue, 20 Jun 2023 07:32:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbjFTLcs (ORCPT ); Tue, 20 Jun 2023 07:32:48 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B0A3FE for ; Tue, 20 Jun 2023 04:32:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=kx0rflILjnefGz1AIFHCumAr85yYTSMNWuTiLbGBzC0=; b=EJ/+GyohnmQW+q4JsMk65ssfOS rj6CbYRk938XsQ9m6dXvFknNAMmybnAW9VuVchJU7PhNz2iMKd+iLJpuybClbsPn9U30QNIqkvxKI oIQRT6x6ThyT8NT+OqnHswhMUu6ePi8/VRDQXUEVrEcHx8foII6BMR3sJuIHy+evOc3XR9KB8Yf4k fLa9SXHHDztUCV7q7r4FyXTBVwXpUDdtX9mFwCqMgOoNje3pUvG1H1hmUING6dhLZORPaK536NWMg UOoBALBwaXngMgod4PxtMJTKwNVBhzR7X1Dd8ZCFa0UHMKlzlmlanFEco0rK8CJI4ROpyp8giVT56 CisInTAQ==; Received: from 2a02-8389-2341-5b80-39d3-4735-9a3c-88d8.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:39d3:4735:9a3c:88d8] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qBZbK-00B8Xf-0l; Tue, 20 Jun 2023 11:32:46 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Pavel Begunkov , io-uring@vger.kernel.org Subject: [PATCH 2/8] io_uring: remove the mode variable in io_file_get_flags Date: Tue, 20 Jun 2023 13:32:29 +0200 Message-Id: <20230620113235.920399-3-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230620113235.920399-1-hch@lst.de> References: <20230620113235.920399-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org The variable is only once now, so don't bother with it. Signed-off-by: Christoph Hellwig --- io_uring/io_uring.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 7e735724940f7f..2d13f636de93c7 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1773,10 +1773,9 @@ static void io_iopoll_req_issued(struct io_kiocb *req, unsigned int issue_flags) */ unsigned int io_file_get_flags(struct file *file) { - umode_t mode = file_inode(file)->i_mode; unsigned int res = 0; - if (S_ISREG(mode)) + if (S_ISREG(file_inode(file)->i_mode)) res |= FFS_ISREG; if ((file->f_flags & O_NONBLOCK) || (file->f_mode & FMODE_NOWAIT)) res |= FFS_NOWAIT;