summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_extattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/vfs_extattr.c')
-rw-r--r--sys/kern/vfs_extattr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index bb89f8c..fac2e2f 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -998,6 +998,7 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags,
FILEDESC_LOCK(fdp);
if (fdp->fd_ofiles[indx] == fp) {
fdp->fd_ofiles[indx] = NULL;
+ fdunused(fdp, indx);
FILEDESC_UNLOCK(fdp);
fdrop(fp, td);
} else {
@@ -1093,6 +1094,7 @@ bad:
FILEDESC_LOCK(fdp);
if (fdp->fd_ofiles[indx] == fp) {
fdp->fd_ofiles[indx] = NULL;
+ fdunused(fdp, indx);
FILEDESC_UNLOCK(fdp);
fdrop(fp, td);
} else {
@@ -3982,6 +3984,7 @@ fhopen(td, uap)
FILEDESC_LOCK(fdp);
if (fdp->fd_ofiles[indx] == fp) {
fdp->fd_ofiles[indx] = NULL;
+ fdunused(fdp, indx);
FILEDESC_UNLOCK(fdp);
fdrop(fp, td);
} else {
OpenPOWER on IntegriCloud