Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\libfs.c Create Date:2022-07-28 20:10:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:simple_rename

Proto:int simple_rename(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry, unsigned int flags)

Type:int

Parameter:

TypeParameterName
struct inode *old_dir
struct dentry *old_dentry
struct inode *new_dir
struct dentry *new_dentry
unsigned intflags
382  inode = d_inode - Get the actual inode of this dentry*@dentry: The dentry to query* This is the helper normal filesystems should use to get at their own inodes* in their own dentries and ignore the layering superimposed upon them.
383  they_are_dirs = d_is_dir(old_dentry)
385  If flags & ~Don't overwrite target Then Return -EINVAL
388  If Not simple_empty(new_dentry) Then Return -ENOTEMPTY
391  If d_really_is_positive - Determine if a dentry is really positive (ignoring fallthroughs)*@dentry: The dentry in question* Returns true if the dentry represents a name that maps to an inode* (ie Then
392  simple_unlink(new_dir, new_dentry)
393  If they_are_dirs Then
397  Else if they_are_dirs Then
398  drop_nlink - directly drop an inode's link count*@inode: inode* This is a low-level filesystem helper to replace any* direct filesystem manipulation of i_nlink
399  _nlink - directly increment an inode's link count*@inode: inode* This is a low-level filesystem helper to replace any* direct filesystem manipulation of i_nlink. Currently,* it is only here for parity with dec_nlink().
402  i_ctime = i_mtime = i_ctime = i_mtime = i_ctime = rrent_time - Return FS time*@inode: inode.* Return the current time truncated to the time granularity supported by* the fs.* Note that inode and inode->sb cannot be NULL.* Otherwise, the function warns and returns time without truncation.
405  Return 0