'\" t .\" Title: debugfs_create_file_unsafe .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: April 2019 .\" Manual: The debugfs filesystem .\" Source: Kernel Hackers Manual 4.9.168 .\" Language: English .\" .TH "DEBUGFS_CREATE_FILE_" "9" "April 2019" "Kernel Hackers Manual 4\&.9\&." "The debugfs filesystem" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" debugfs_create_file_unsafe \- create a file in the debugfs filesystem .SH "SYNOPSIS" .HP \w'struct\ dentry\ *\ debugfs_create_file_unsafe('u .BI "struct dentry * debugfs_create_file_unsafe(const\ char\ *\ " "name" ", umode_t\ " "mode" ", struct\ dentry\ *\ " "parent" ", void\ *\ " "data" ", const\ struct\ file_operations\ *\ " "fops" ");" .SH "ARGUMENTS" .PP \fIname\fR .RS 4 a pointer to a string containing the name of the file to create\&. .RE .PP \fImode\fR .RS 4 the permission that the file should have\&. .RE .PP \fIparent\fR .RS 4 a pointer to the parent dentry for this file\&. This should be a directory dentry if set\&. If this parameter is NULL, then the file will be created in the root of the debugfs filesystem\&. .RE .PP \fIdata\fR .RS 4 a pointer to something that the caller will want to get to later on\&. The inode\&.i_private pointer will point to this value on the \fBopen\fR call\&. .RE .PP \fIfops\fR .RS 4 a pointer to a struct file_operations that should be used for this file\&. .RE .SH "DESCRIPTION" .PP \fBdebugfs_create_file_unsafe\fR is completely analogous to \fBdebugfs_create_file\fR, the only difference being that the fops handed it will not get protected against file removals by the debugfs core\&. .PP It is your responsibility to protect your struct file_operation methods against file removals by means of \fBdebugfs_use_file_start\fR and \fBdebugfs_use_file_finish\fR\&. \->\fBopen\fR is still protected by debugfs though\&. .PP Any struct file_operations defined by means of \fBDEFINE_DEBUGFS_ATTRIBUTE\fR is protected against file removals and thus, may be used here\&. .SH "COPYRIGHT" .br