mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 08:38:38 +08:00
fs/rename: Do not send notify if the same
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
parent
ddc3119c4e
commit
1bb0f19fd5
1 changed files with 9 additions and 9 deletions
|
@ -249,8 +249,6 @@ next_subdir:
|
|||
errout_with_lock:
|
||||
inode_unlock();
|
||||
|
||||
errout:
|
||||
RELEASE_SEARCH(&newdesc);
|
||||
#ifdef CONFIG_FS_NOTIFY
|
||||
if (ret >= 0)
|
||||
{
|
||||
|
@ -258,6 +256,8 @@ errout:
|
|||
}
|
||||
#endif
|
||||
|
||||
errout:
|
||||
RELEASE_SEARCH(&newdesc);
|
||||
if (subdir != NULL)
|
||||
{
|
||||
lib_free(subdir);
|
||||
|
@ -462,6 +462,13 @@ next_subdir:
|
|||
|
||||
ret = oldinode->u.i_mops->rename(oldinode, oldrelpath, newrelpath);
|
||||
|
||||
#ifdef CONFIG_FS_NOTIFY
|
||||
if (ret >= 0)
|
||||
{
|
||||
notify_rename(oldpath, oldisdir, newpath, newisdir);
|
||||
}
|
||||
#endif
|
||||
|
||||
errout_with_newinode:
|
||||
inode_release(newinode);
|
||||
|
||||
|
@ -472,13 +479,6 @@ errout_with_newsearch:
|
|||
lib_free(subdir);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FS_NOTIFY
|
||||
if (ret >= 0)
|
||||
{
|
||||
notify_rename(oldpath, oldisdir, newpath, newisdir);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif /* CONFIG_DISABLE_MOUNTPOINT */
|
||||
|
|
Loading…
Reference in a new issue