Page MenuHomeFreeBSD

D4351.id10677.diff
No OneTemporary

D4351.id10677.diff

Index: sys/compat/linuxkpi/common/include/linux/file.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/file.h
+++ sys/compat/linuxkpi/common/include/linux/file.h
@@ -89,7 +89,10 @@
*/
fdclose(curthread, file, fd);
- /* drop extra reference */
+ /* drop reference from fget_unlocked() */
+ fdrop(file, curthread);
+
+ /* drop extra reference from falloc() */
fdrop(file, curthread);
}
@@ -106,7 +109,10 @@
filp->_file = file;
finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops);
- /* drop the extra reference */
+ /* drop the reference from fget_unlocked() */
+ fput(filp);
+
+ /* drop extra reference from falloc() */
fput(filp);
}
@@ -120,8 +126,6 @@
error = falloc(curthread, &file, &fd, 0);
if (error)
return -error;
- /* drop the extra reference */
- fdrop(file, curthread);
return fd;
}
@@ -135,8 +139,6 @@
error = falloc(curthread, &file, &fd, flags);
if (error)
return -error;
- /* drop the extra reference */
- fdrop(file, curthread);
return fd;
}

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 5, 3:41 PM (12 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29266443
Default Alt Text
D4351.id10677.diff (1 KB)

Event Timeline