---
name: "vfs_busy"
section: "9"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/vfs_busy"
---

# vfs\_busy(9)

marks a mount point as busy

## NAME

**vfs\_busy** – marks a mount point as busy

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<sys/mount.h\>**

*int*\

**vfs\_busy**(*struct mount \*mp*, *int flags*);

## DESCRIPTION

The **vfs\_busy**() function marks a mount point as busy by incrementing the reference count of a mount point. It also delays unmounting by sleeping on *mp* if the MNTK\_UNMOUNT flag is set in *mp-\>mnt\_kern\_flag* and the MBF\_NOWAIT flag is *not* set.

Its arguments are:

- *mp*

  The mount point to busy.

- *flags*

  Flags controlling how **vfs\_busy**() should act.

  - MBF\_NOWAIT

    do not sleep if MNTK\_UNMOUNT is set.

  - MBF\_MNTLSTLOCK

    drop the mountlist\_mtx in the critical path.

## RETURN VALUES

A 0 value is returned on success. If the mount point is being unmounted and MBF\_NOWAIT flag is specified ENOENT will be returned.

## ERRORS

- \[ENOENT\]

  The mount point is being unmounted (MNTK\_UNMOUNT is set).

## SEE ALSO

[vfs\_unbusy(9)](/vfs_unbusy/9.md)

## AUTHORS

This manual page was written by Chad David ⟨*davidc@acns.ab.ca*⟩.
