version 1.79.8.2, 2006/05/24 10:59:25 |
version 1.79.8.3, 2006/06/26 12:54:49 |
|
|
ffs_itimes(struct inode *ip, const struct timespec *acc, |
ffs_itimes(struct inode *ip, const struct timespec *acc, |
const struct timespec *mod, const struct timespec *cre) |
const struct timespec *mod, const struct timespec *cre) |
{ |
{ |
struct timespec *ts = NULL, tsb; |
struct timespec now; |
|
|
if (!(ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_UPDATE | IN_MODIFY))) { |
if (!(ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_UPDATE | IN_MODIFY))) { |
return; |
return; |
} |
} |
|
|
|
vfs_timestamp(&now); |
if (ip->i_flag & IN_ACCESS) { |
if (ip->i_flag & IN_ACCESS) { |
if (acc == NULL) |
if (acc == NULL) |
acc = ts = nanotime(&tsb); |
acc = &now; |
DIP_ASSIGN(ip, atime, acc->tv_sec); |
DIP_ASSIGN(ip, atime, acc->tv_sec); |
DIP_ASSIGN(ip, atimensec, acc->tv_nsec); |
DIP_ASSIGN(ip, atimensec, acc->tv_nsec); |
} |
} |
if (ip->i_flag & (IN_UPDATE | IN_MODIFY)) { |
if (ip->i_flag & (IN_UPDATE | IN_MODIFY)) { |
if ((ip->i_flags & SF_SNAPSHOT) == 0) { |
if ((ip->i_flags & SF_SNAPSHOT) == 0) { |
if (mod == NULL) |
if (mod == NULL) |
mod = ts == NULL ? (ts = nanotime(&tsb)) : ts; |
mod = &now; |
DIP_ASSIGN(ip, mtime, mod->tv_sec); |
DIP_ASSIGN(ip, mtime, mod->tv_sec); |
DIP_ASSIGN(ip, mtimensec, mod->tv_nsec); |
DIP_ASSIGN(ip, mtimensec, mod->tv_nsec); |
} |
} |
Line 667 ffs_itimes(struct inode *ip, const struc |
|
Line 668 ffs_itimes(struct inode *ip, const struc |
|
} |
} |
if (ip->i_flag & (IN_CHANGE | IN_MODIFY)) { |
if (ip->i_flag & (IN_CHANGE | IN_MODIFY)) { |
if (cre == NULL) |
if (cre == NULL) |
cre = ts == NULL ? (ts = nanotime(&tsb)) : ts; |
cre = &now; |
DIP_ASSIGN(ip, ctime, cre->tv_sec); |
DIP_ASSIGN(ip, ctime, cre->tv_sec); |
DIP_ASSIGN(ip, ctimensec, cre->tv_nsec); |
DIP_ASSIGN(ip, ctimensec, cre->tv_nsec); |
} |
} |