summaryrefslogtreecommitdiff
path: root/src/sys/os/vfs_subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/os/vfs_subr.c')
-rw-r--r--src/sys/os/vfs_subr.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/sys/os/vfs_subr.c b/src/sys/os/vfs_subr.c
index a06b64f..6cb7767 100644
--- a/src/sys/os/vfs_subr.c
+++ b/src/sys/os/vfs_subr.c
@@ -203,3 +203,24 @@ vop_read(struct vnode *vp, char *data, off_t off, size_t len)
rwdata.off = off;
return vops->read(&rwdata);
}
+
+int
+vop_reclaim(struct vnode *vp, int flags)
+{
+ struct vop *vops;
+
+ if (vp == NULL) {
+ return -EINVAL;
+ }
+
+ /* Grab the virtual operations */
+ if ((vops = vp->vops) == NULL) {
+ return -EIO;
+ }
+
+ if (vops->reclaim == NULL) {
+ return -ENOTSUP;
+ }
+
+ return vops->reclaim(vp, flags);
+}