incubator-nuttx/fs/driver
dongjiuzhu1 09a9611ae9 fs/inode: using rwsem lock as inode_lock to avoid deadlock
Example:
When executing "df -h" on Core A to view mount information, this
process will traverse inode nodes, thereby holding the inode_lock.
Since the inode type of the mount point may be rpmsgfs, it will fetch statfs
information from another Core B.

Meanwhile, rcS on Core B needs to obtain file information from Core A,
which will be achieved by fetching stat information through rpmsgfs.
When this message arrives at Core A, a deadlock can occur between Core A's
rptun ap and nsh task.

However, both of these places involve read operations only, thus a reader-writer lock
can be utilized to prevent such a deadlock.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-02 01:56:46 +08:00
..
CMakeLists.txt fs: add pipe type support to inode 2023-08-05 06:32:50 -07:00
Make.defs fs: add pipe type support to inode 2023-08-05 06:32:50 -07:00
driver.h rpmsgblk: bind block inode to ept when create ept 2023-11-22 08:08:12 -08:00
fs_blockpartition.c fs/xxfs:Replace kmm with fs heap 2024-09-30 16:30:56 +08:00
fs_blockproxy.c nuttx: use sizeof instead of define or number in snprintf 2024-08-25 19:22:15 +08:00
fs_closeblockdriver.c Author: Gregory Nutt: update licenses to Apache 2021-02-05 12:15:56 -03:00
fs_closemtddriver.c driver: move find_mtddriver() to fs.h and add close_mtddriver.c 2022-09-09 19:27:57 +08:00
fs_findblockdriver.c fs/inode: remove all unnecessary check for filep/inode 2023-08-29 09:47:11 +08:00
fs_findmtddriver.c fs/inode: remove all unnecessary check for filep/inode 2023-08-29 09:47:11 +08:00
fs_mtdpartition.c fs/partition: register partition device if caller doesn't provide handler 2023-05-27 20:23:17 -03:00
fs_mtdproxy.c nuttx: use sizeof instead of define or number in snprintf 2024-08-25 19:22:15 +08:00
fs_openblockdriver.c Author: Gregory Nutt: update licenses to Apache 2021-02-05 12:15:56 -03:00
fs_registerblockdriver.c fs/inode: using rwsem lock as inode_lock to avoid deadlock 2024-10-02 01:56:46 +08:00
fs_registerdriver.c fs/inode: using rwsem lock as inode_lock to avoid deadlock 2024-10-02 01:56:46 +08:00
fs_registermtddriver.c fs/inode: using rwsem lock as inode_lock to avoid deadlock 2024-10-02 01:56:46 +08:00
fs_registerpipedriver.c fs/inode: using rwsem lock as inode_lock to avoid deadlock 2024-10-02 01:56:46 +08:00
fs_unregisterblockdriver.c fs/inode: using rwsem lock as inode_lock to avoid deadlock 2024-10-02 01:56:46 +08:00
fs_unregisterdriver.c fs/inode: using rwsem lock as inode_lock to avoid deadlock 2024-10-02 01:56:46 +08:00
fs_unregistermtddriver.c fs/inode: using rwsem lock as inode_lock to avoid deadlock 2024-10-02 01:56:46 +08:00
fs_unregisterpipedriver.c fs/inode: using rwsem lock as inode_lock to avoid deadlock 2024-10-02 01:56:46 +08:00