table of contents
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¶
const struct dentry * dentry
int * srcu_idx
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¶
July 2017 | Kernel Hackers Manual 4.12 |