aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fuse.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fuse.c')
-rw-r--r--lib/fuse.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/fuse.c b/lib/fuse.c
index eeae295..fe392f3 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -865,17 +865,14 @@ static void do_flush(struct fuse *f, struct fuse_in_header *in)
static void do_release(struct fuse *f, struct fuse_in_header *in,
struct fuse_open_in *arg)
{
- char *path;
-
- if (!f->op.release) {
- send_reply(f, in, -ENOSYS, NULL, 0);
- return;
- }
+ if (f->op.release) {
+ char *path;
- path = get_path(f, in->ino);
- if (path != NULL) {
- f->op.release(path, arg->flags);
- free(path);
+ path = get_path(f, in->ino);
+ if (path != NULL) {
+ f->op.release(path, arg->flags);
+ free(path);
+ }
}
}