* @brief Increase the reference count of a dfs_mnt structure instance. * * This function increments the reference count of the specified dfs_mnt structure. * The reference count is used to track how many parts of the system are currently * using this mount point. * * @param[in,out] mnt Pointer to the dfs_mnt structure whose reference count is to be increased. * If the poi
| 313 | * If the input pointer is NULL, it simply returns NULL. |
| 314 | */ |
| 315 | struct dfs_mnt* dfs_mnt_ref(struct dfs_mnt* mnt) |
| 316 | { |
| 317 | if (mnt) |
| 318 | { |
| 319 | rt_atomic_add(&(mnt->ref_count), 1); |
| 320 | DLOG(note, "mnt", "mnt(%s),ref_count=%d", mnt->fs_ops->name, rt_atomic_load(&(mnt->ref_count))); |
| 321 | } |
| 322 | |
| 323 | return mnt; |
| 324 | } |
| 325 | |
| 326 | /** |
| 327 | * @brief Decrease the reference count of a dfs_mnt structure instance and free it if necessary. |
no outgoing calls
no test coverage detected