Skip to content

Commit

Permalink
file: add fd_raw cleanup class
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christian Brauner committed May 9, 2024
1 parent f6bdc78 commit a0fde7e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a0fde7e

Please sign in to comment.