| debugfs_use_file_start(9) - phpMan
DEBUGFS_USE_FILE_STA(9) The debugfs filesystem DEBUGFS_USE_FILE_STA(9)
NAME
debugfs_use_file_start - mark the beginning of file data access
SYNOPSIS
int debugfs_use_file_start(const struct dentry * dentry, int * srcu_idx);
ARGUMENTS
dentry
the dentry object whose data is being accessed.
srcu_idx
a pointer to some memory to store a SRCU index in.
DESCRIPTION
Up to a matching call to debugfs_use_file_finish, any successive call into the file
removing functions debugfs_remove and debugfs_remove_recursive will block. Since
associated private file data may only get freed after a successful return of any of the
removal functions, you may safely access it after a successful call to
debugfs_use_file_start without worrying about lifetime issues.
If -EIO is returned, the file has already been removed and thus, it is not safe to access
any of its data. If, on the other hand, it is allowed to access the file data, zero is
returned.
Regardless of the return code, any call to debugfs_use_file_start must be followed by a
matching call to debugfs_use_file_finish.
COPYRIGHT
Kernel Hackers Manual 4.8. January 2017 DEBUGFS_USE_FILE_STA(9)
|