projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6bdc78
)
file: add fd_raw cleanup class
author
Christian Brauner
<brauner@kernel.org>
Thu, 9 May 2024 11:02:39 +0000
(13:02 +0200)
committer
Christian Brauner
<brauner@kernel.org>
Thu, 9 May 2024 11:02:39 +0000
(13:02 +0200)
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>
include/linux/file.h
patch
|
blob
|
history
diff --git
a/include/linux/file.h
b/include/linux/file.h
index 169692cb1906d8015cca7b854c1eaeedb3db09e2..45d0f4800abd417a6fdd9be58988046cb5430ac8 100644
(file)
--- a/
include/linux/file.h
+++ b/
include/linux/file.h
@@
-84,6
+84,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);