aboutsummaryrefslogtreecommitdiff
path: root/src/libfs/close.c
blob: 23388ae3e74836774f8d27b8309836abb03e0ce2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* Copyright (C) 2003 Russ Cox, Massachusetts Institute of Technology */
/* See COPYRIGHT */

#include <u.h>
#include <libc.h>
#include <fcall.h>
#include <fs.h>
#include "fsimpl.h"

static void
fidclunk(Fid *fid)
{
	Fcall tx, rx;

	tx.type = Tclunk;
	tx.fid = fid->fid;
	fsrpc(fid->fs, &tx, &rx, 0);
	_fsputfid(fid);
}

void
fsclose(Fid *fid)
{
	/* maybe someday there will be a ref count */
	fidclunk(fid);
}