diff options
| author | Matthew Dillon <dillon@FreeBSD.org> | 2001-10-24 18:32:17 +0000 |
|---|---|---|
| committer | Matthew Dillon <dillon@FreeBSD.org> | 2001-10-24 18:32:17 +0000 |
| commit | a06fe5111e451d0dc0ddd53f602adc7af83a06cf (patch) | |
| tree | c5b73f96b5e4fa07d0df7a065760e23e3d4732ee /sys | |
| parent | 553b79aa630f4da41f151c975a6b72e7c27fccb4 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/kern/vfs_extattr.c | 5 | ||||
| -rw-r--r-- | sys/kern/vfs_syscalls.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index b260d556ac72..f8397ab59bfb 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -3622,8 +3622,11 @@ fhopen(td, uap) * end of vn_open code */ - if ((error = falloc(td, &nfp, &indx)) != 0) + if ((error = falloc(td, &nfp, &indx)) != 0) { + if (fmode & FWRITE) + vp->v_writecount--; goto bad; + } fp = nfp; /* diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index b260d556ac72..f8397ab59bfb 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -3622,8 +3622,11 @@ fhopen(td, uap) * end of vn_open code */ - if ((error = falloc(td, &nfp, &indx)) != 0) + if ((error = falloc(td, &nfp, &indx)) != 0) { + if (fmode & FWRITE) + vp->v_writecount--; goto bad; + } fp = nfp; /* |
