[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH] lib/vfscore: Introduce `vfscore_put_file`
Hi, looks good to me Reviewed-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx> -Yuri. Simon Kuenzer <simon.kuenzer@xxxxxxxxx> writes: > As counterpart to `vfscore_get_file`, we export `vfscore_put_file` > as a way to release the refcount on a file. > > Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx> > --- > lib/vfscore/exportsyms.uk | 1 + > lib/vfscore/fd.c | 5 +++++ > lib/vfscore/include/vfscore/file.h | 1 + > 3 files changed, 7 insertions(+) > > diff --git a/lib/vfscore/exportsyms.uk b/lib/vfscore/exportsyms.uk > index 10fed806..e2afafa7 100644 > --- a/lib/vfscore/exportsyms.uk > +++ b/lib/vfscore/exportsyms.uk > @@ -2,6 +2,7 @@ vfscore_alloc_fd > vfscore_put_fd > vfscore_install_fd > vfscore_get_file > +vfscore_put_file > close > write > read > diff --git a/lib/vfscore/fd.c b/lib/vfscore/fd.c > index 5abed969..111b0229 100644 > --- a/lib/vfscore/fd.c > +++ b/lib/vfscore/fd.c > @@ -133,6 +133,11 @@ exit: > return ret; > } > > +void vfscore_put_file(struct vfscore_file *file) > +{ > + fdrop(file); > +} > + > int fget(int fd, struct vfscore_file **out_fp) > { > int ret = 0; > diff --git a/lib/vfscore/include/vfscore/file.h > b/lib/vfscore/include/vfscore/file.h > index 7f45ca78..80845b79 100644 > --- a/lib/vfscore/include/vfscore/file.h > +++ b/lib/vfscore/include/vfscore/file.h > @@ -65,6 +65,7 @@ int vfscore_alloc_fd(void); > void vfscore_put_fd(int fd); > int vfscore_install_fd(int fd, struct vfscore_file *file); > struct vfscore_file *vfscore_get_file(int fd); > +void vfscore_put_file(struct vfscore_file *file); > > /* > * File descriptors reference count > -- > 2.11.0 > -- Yuri Volchkov Software Specialist NEC Europe Ltd Kurfürsten-Anlage 36 D-69115 Heidelberg _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |