]> xenbits.xensource.com Git - people/andrewcoop/mini-os.git/commit
reset file type in close() in one place only
authorJuergen Gross <jgross@suse.com>
Sun, 16 Jan 2022 06:45:24 +0000 (07:45 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 17 Jan 2022 10:55:46 +0000 (10:55 +0000)
commit83558bc823b3b0e14d9321f587d6d7bfb990380b
tree64d033debbc696eb8182be3dfbb66c4cafd79ded
parent0e19f674ab48dfce8be5a43d2fca78293a2e3ad8
reset file type in close() in one place only

Today the file type in struct file is set to FTYPE_NONE for each
file type individually. Do that at the end of close() handling for
all types.

While at it wipe the complete struct file, too, in order to avoid
old data creeping into a new allocated struct file.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
lib/sys.c
lib/xs.c