[BACK]Return to ffs_inode.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / ufs / ffs

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/ufs/ffs/ffs_inode.c between version 1.81 and 1.82

version 1.81, 2006/05/14 21:32:45 version 1.82, 2006/06/07 22:34:19
Line 644  void
Line 644  void
 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;
         }          }
   
           getnanotime(&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);
         }          }

Legend:
Removed from v.1.81  
changed lines
  Added in v.1.82

CVSweb <webmaster@jp.NetBSD.org>