[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <eeaba25e-7c79-3c46-c39e-a2352dbfe007@openvz.org>
Date: Sun, 22 May 2022 15:07:25 +0300
From: Vasily Averin <vvs@...nvz.org>
To: linux-fsdevel@...r.kernel.org
Cc: kernel@...nvz.org, linux-kernel@...r.kernel.org,
Christoph Hellwig <hch@...radead.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>
Subject: [PATCH v3] fs/open.c: fix incorrect fmode_t cast in build_open_how
Fixes sparce warning:
fs/open.c:1024:21: sparse: warning: restricted fmode_t degrades to integer
FMODE_NONOTIFY have bitwise fmode_t type which requires __force for any
casts. Use __FMODE_NONTIFY instead.
Signed-off-by: Vasily Averin <vvs@...nvz.org>
Acked-by: Jan Kara <jack@...e.cz>
Reviewed-by: Christian Brauner (Microsoft) <brauner@...nel.org>
---
v3: split, according to Christoph Hellwig recommendation
---
fs/open.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/open.c b/fs/open.c
index 1315253e0247..386c52e4c3b1 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -1021,7 +1021,7 @@ inline struct open_how build_open_how(int flags, umode_t mode)
inline int build_open_flags(const struct open_how *how, struct open_flags *op)
{
u64 flags = how->flags;
- u64 strip = FMODE_NONOTIFY | O_CLOEXEC;
+ u64 strip = __FMODE_NONOTIFY | O_CLOEXEC;
int lookup_flags = 0;
int acc_mode = ACC_MODE(flags);
--
2.36.1
Powered by blists - more mailing lists