From: Christian Brauner brauner@kernel.org
commit a0fde7e upstream.
So we can also use CLASS(fd_raw, f)(fd) for codepaths where we allow FMODE_PATH aka O_PATH file descriptors to be used.
Signed-off-by: Christian Brauner brauner@kernel.org
Cc: stable@vger.kernel.org # 6.1.x Signed-off-by: Miao Wang shankerwangmiao@gmail.com Tested-by: Xi Ruoyao xry111@xry111.site --- include/linux/file.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/linux/file.h b/include/linux/file.h index 6e9099d29343..963df2dc4f61 100644 --- a/include/linux/file.h +++ b/include/linux/file.h @@ -82,6 +82,7 @@ static inline void fdput_pos(struct fd f) }
DEFINE_CLASS(fd, struct fd, fdput(_T), fdget(fd), int fd) +DEFINE_CLASS(fd_raw, struct fd, fdput(_T), fdget_raw(fd), int fd)
extern int f_dupfd(unsigned int from, struct file *file, unsigned flags); extern int replace_fd(unsigned fd, struct file *file, unsigned flags);