VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Al Viro <viro@ZenIV.linux.org.uk> 2008-10-31 23:28:30 +0000 committer: Linus Torvalds <torvalds@linux-foundation.org> 2008-11-01 09:49:46 -0700 commit: 233e70f4228e78eb2f80dc6650f65d3ae3dbf17c parent: 3318a386e4ca68c76e0294363d29bdc46fcad670
Commit Summary:
saner FASYNC handling on file close
Diffstat:
1 file changed, 4 insertions, 0 deletions
diff --git a/fs/file_table.c b/fs/file_table.c
index efc06faede6c..5ad0eca6eea2 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -269,6 +269,10 @@ void __fput(struct file *file)
 	eventpoll_release(file);
 	locks_remove_flock(file);
 
+	if (unlikely(file->f_flags & FASYNC)) {
+		if (file->f_op && file->f_op->fasync)
+			file->f_op->fasync(-1, file, 0);
+	}
 	if (file->f_op && file->f_op->release)
 		file->f_op->release(inode, file);
 	security_file_free(file);