diff options
Diffstat (limited to 'ufs/dir.c')
-rw-r--r-- | ufs/dir.c | 21 |
1 files changed, 9 insertions, 12 deletions
@@ -1,5 +1,7 @@ /* Directory management routines - Copyright (C) 1994,95,96,97,98,99,2000,02 Free Software Foundation, Inc. + + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2007 + Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -162,8 +164,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, inum = 0; - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); /* Start the lookup at DP->dn->dir_idx. */ idx = dp->dn->dir_idx; @@ -200,8 +201,7 @@ diskfs_lookup_hard (struct node *dp, const char *name, enum lookup_type type, } } - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); if (diskfs_synchronous) diskfs_node_update (dp, 1); @@ -664,7 +664,7 @@ diskfs_direnter_hard(struct node *dp, /* Following a lookup call for REMOVE, this removes the link from the directory. DP is the directory being changed and DS is the cached information returned from lookup. This call is only valid if the - directory has been locked continously since the call to lookup, and + directory has been locked continuously since the call to lookup, and only if that call succeeded. */ error_t diskfs_dirremove_hard(struct node *dp, @@ -752,8 +752,7 @@ diskfs_dirempty(struct node *dp, mach_port_deallocate (mach_task_self (), memobj); assert (!err); - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); for (curoff = buf; curoff < buf + dp->dn_stat.st_size; @@ -768,15 +767,13 @@ diskfs_dirempty(struct node *dp, && entry->d_name[1] != '\0'))) { munmap ((caddr_t) buf, dp->dn_stat.st_size); - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); if (diskfs_synchronous) diskfs_node_update (dp, 1); return 0; } } - if (!diskfs_check_readonly ()) - dp->dn_set_atime = 1; + diskfs_set_node_atime (dp); if (diskfs_synchronous) diskfs_node_update (dp, 1); munmap ((caddr_t) buf, dp->dn_stat.st_size); |