diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2006-10-20 08:03:42 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2006-10-20 08:03:42 +0000 |
commit | 16f50bcd80c1b76c7cf663f264f9030c82da814e (patch) | |
tree | ddd8a163f23d48b63f6cb1868d17c8ca4c1f8f77 /sys/fs/devfs | |
parent | 1663075c64ff620bf76eee2aebd93b051e5931d6 (diff) | |
download | src-16f50bcd80c1b76c7cf663f264f9030c82da814e.tar.gz src-16f50bcd80c1b76c7cf663f264f9030c82da814e.zip |
Update the access and modification times for dev while still holding
thread reference on it.
Reviewed by: tegge
Approved by: pjd (mentor)
Notes
Notes:
svn path=/head/; revision=163530
Diffstat (limited to 'sys/fs/devfs')
-rw-r--r-- | sys/fs/devfs/devfs_vnops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 55eaeb6d03b7..b17eb4dc15b4 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -850,9 +850,9 @@ devfs_read_f(struct file *fp, struct uio *uio, struct ucred *cred, int flags, st uio->uio_offset = fp->f_offset; error = dsw->d_read(dev, uio, ioflag); - dev_relthread(dev); if (uio->uio_resid != resid || (error == 0 && resid != 0)) vfs_timestamp(&dev->si_atime); + dev_relthread(dev); if ((flags & FOF_OFFSET) == 0) fp->f_offset = uio->uio_offset; @@ -1269,11 +1269,11 @@ devfs_write_f(struct file *fp, struct uio *uio, struct ucred *cred, int flags, s resid = uio->uio_resid; error = dsw->d_write(dev, uio, ioflag); - dev_relthread(dev); if (uio->uio_resid != resid || (error == 0 && resid != 0)) { vfs_timestamp(&dev->si_ctime); dev->si_mtime = dev->si_ctime; } + dev_relthread(dev); if ((flags & FOF_OFFSET) == 0) fp->f_offset = uio->uio_offset; |