Commit 55f335a8 authored by Linus Torvalds's avatar Linus Torvalds

fasync: Fix placement of FASYNC flag comment

In commit f7347ce4 ("fasync: re-organize fasync entry insertion to
allow it under a spinlock") Arnd took an earlier patch of mine that had
the comment about the FASYNC flag above the wrong function.

When the fasync_add_entry() function was split to introduce the new
fasync_insert_entry() helper function, the code that actually cares
about the FASYNC bit moved to that new helper.

So just move the comment to the right point.
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7420a8c0
...@@ -684,6 +684,9 @@ void fasync_free(struct fasync_struct *new) ...@@ -684,6 +684,9 @@ void fasync_free(struct fasync_struct *new)
/* /*
* Insert a new entry into the fasync list. Return the pointer to the * Insert a new entry into the fasync list. Return the pointer to the
* old one if we didn't use the new one. * old one if we didn't use the new one.
*
* NOTE! It is very important that the FASYNC flag always
* match the state "is the filp on a fasync list".
*/ */
struct fasync_struct *fasync_insert_entry(int fd, struct file *filp, struct fasync_struct **fapp, struct fasync_struct *new) struct fasync_struct *fasync_insert_entry(int fd, struct file *filp, struct fasync_struct **fapp, struct fasync_struct *new)
{ {
...@@ -718,9 +721,6 @@ struct fasync_struct *fasync_insert_entry(int fd, struct file *filp, struct fasy ...@@ -718,9 +721,6 @@ struct fasync_struct *fasync_insert_entry(int fd, struct file *filp, struct fasy
/* /*
* Add a fasync entry. Return negative on error, positive if * Add a fasync entry. Return negative on error, positive if
* added, and zero if did nothing but change an existing one. * added, and zero if did nothing but change an existing one.
*
* NOTE! It is very important that the FASYNC flag always
* match the state "is the filp on a fasync list".
*/ */
static int fasync_add_entry(int fd, struct file *filp, struct fasync_struct **fapp) static int fasync_add_entry(int fd, struct file *filp, struct fasync_struct **fapp)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment