Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:utimes_common

Proto:static int utimes_common(const struct path *path, struct timespec64 *times)

Type:int

Parameter:

TypeParameterName
const struct path *path
struct timespec64 *times
23  inode = Where the name belongs to - NULL is * negative
24  struct inode * delegated_inode = NULL
26  error = mnt_want_write - get write access to a mount*@m: the mount on which to take a write* This tells the low-level filesystem that a write is about to be performed to* it, and makes sure that writes are allowed (mount is read-write, filesystem
27  If error Then Go to out
30  If times && nanoseconds == UTIME_NOW && nanoseconds == UTIME_NOW Then times = NULL
34  ia_valid = ATTR_CTIME | ATTR_MTIME | ATTR_ATIME
35  If times Then
36  If nanoseconds == UTIME_OMIT Then ia_valid &= ~ATTR_ATIME
38  Else if nanoseconds != UTIME_NOW Then
39  ia_atime = times[0]
43  If nanoseconds == UTIME_OMIT Then ia_valid &= ~ATTR_MTIME
45  Else if nanoseconds != UTIME_NOW Then
46  ia_mtime = times[1]
54  ia_valid |= ATTR_TIMES_SET
55  Else
56  ia_valid |= ATTR_TOUCH
58  retry_deleg :
59  inode_lock(inode)
60  error = y_change - modify attributes of a filesytem object*@dentry: object affected*@attr: new attributes*@delegated_inode: returns inode, if the inode is delegated* The caller must hold the i_mutex on the affected object
61  inode_unlock(inode)
62  If delegated_inode Then
63  error = break_deleg_wait( & delegated_inode)
64  If Not error Then Go to retry_deleg
68  mnt_drop_write - give up write access to a mount*@mnt: the mount on which to give up write access* Tells the low-level filesystem that we are done performing writes to it and* also allows filesystem to be frozen again. Must be matched with
69  out :
70  Return error
Caller
NameDescribe
do_utimesdo_utimes - change times on filename or file descriptor*@dfd: open file descriptor, -1 or AT_FDCWD*@filename: path name or NULL*@times: new times or NULL*@flags: zero or more flags (only AT_SYMLINK_NOFOLLOW for the moment)* If filename is NULL and dfd