diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2001-06-23 02:15:25 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2001-06-23 02:15:25 +0000 |
commit | 0d0bb60489a587654939a483986aa833252268f3 (patch) | |
tree | 46d13607dd3390caa52db66106725cb83e20395c /sys/msdosfs/msdosfs_denode.c | |
parent | c7b0cb75249b0df0ca9bfb325be9fa4b8b6551a4 (diff) |
Get rid of several vnode operations
Diffstat (limited to 'sys/msdosfs/msdosfs_denode.c')
-rw-r--r-- | sys/msdosfs/msdosfs_denode.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c index 036770e8f8f..82187cbd7df 100644 --- a/sys/msdosfs/msdosfs_denode.c +++ b/sys/msdosfs/msdosfs_denode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_denode.c,v 1.16 1999/04/28 09:28:16 art Exp $ */ +/* $OpenBSD: msdosfs_denode.c,v 1.17 2001/06/23 02:15:24 csapuntz Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.23 1997/10/17 11:23:58 ws Exp $ */ /*- @@ -340,10 +340,32 @@ deupdat(dep, waitfor) struct denode *dep; int waitfor; { + struct buf *bp; + struct direntry *dirp; + int error; struct timespec ts; + if (DETOV(dep)->v_mount->mnt_flag & MNT_RDONLY) + return (0); TIMEVAL_TO_TIMESPEC(&time, &ts); - return (VOP_UPDATE(DETOV(dep), &ts, &ts, waitfor)); + DETIMES(dep, &ts, &ts, &ts); + if ((dep->de_flag & DE_MODIFIED) == 0) + return (0); + dep->de_flag &= ~DE_MODIFIED; + if (dep->de_Attributes & ATTR_DIRECTORY) + return (0); + if (dep->de_refcnt <= 0) + return (0); + error = readde(dep, &bp, &dirp); + if (error) + return (error); + DE_EXTERNALIZE(dirp, dep); + if (waitfor) + return (bwrite(bp)); + else { + bdwrite(bp); + return (0); + } } /* |