diff options
Diffstat (limited to 'fs/file.c')
-rw-r--r-- | fs/file.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/file.c b/fs/file.c index efd9959b03c2..fb1011cf6b4a 100644 --- a/fs/file.c +++ b/fs/file.c @@ -1120,6 +1120,13 @@ EXPORT_SYMBOL(fget_task_next); * * The fput_needed flag returned by fget_light should be passed to the * corresponding fput_light. + * + * (As an exception to rule 2, you can call filp_close between fget_light and + * fput_light provided that you capture a real refcount with get_file before + * the call to filp_close, and ensure that this real refcount is fput *after* + * the fput_light call.) + * + * See also the documentation in rust/kernel/file.rs. */ static inline struct fd __fget_light(unsigned int fd, fmode_t mask) { |