Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F135757842
D31672.id94185.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D31672.id94185.diff
View Options
Index: sys/compat/linuxkpi/common/include/linux/fs.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/fs.h
+++ sys/compat/linuxkpi/common/include/linux/fs.h
@@ -254,6 +254,13 @@
return (f);
}
+static inline bool
+get_file_rcu(struct linux_file *f)
+{
+ return (refcount_acquire_if_not_zero(
+ f->_file == NULL ? &f->f_count : &f->_file->f_count));
+}
+
static inline struct inode *
igrab(struct inode *inode)
{
Index: sys/compat/linuxkpi/common/src/linux_compat.c
===================================================================
--- sys/compat/linuxkpi/common/src/linux_compat.c
+++ sys/compat/linuxkpi/common/src/linux_compat.c
@@ -90,6 +90,7 @@
#include <linux/poll.h>
#include <linux/smp.h>
#include <linux/wait_bit.h>
+#include <linux/rcupdate.h>
#if defined(__i386__) || defined(__amd64__)
#include <asm/smp.h>
@@ -1538,6 +1539,7 @@
ldev = filp->f_cdev;
if (ldev != NULL)
linux_cdev_deref(ldev);
+ linux_synchronize_rcu(RCU_TYPE_REGULAR);
kfree(filp);
return (error);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 13, 1:41 PM (5 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25257529
Default Alt Text
D31672.id94185.diff (1 KB)
Attached To
Mode
D31672: LinuxKPI: Implement get_file_rcu()
Attached
Detach File
Event Timeline
Log In to Comment