diff options
author | attilio <attilio@FreeBSD.org> | 2012-11-03 23:32:32 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2012-11-03 23:32:32 +0000 |
commit | 35cb5e8a859239baecd5223b03e9a410078d9936 (patch) | |
tree | 9237605f7f8fcd8c7ef6437dab344e2937ddaaec /sys/fs/fuse/fuse_vnops.c | |
parent | c99a93ed4c887d5d5e598ee50101ab2e7850e931 (diff) | |
download | FreeBSD-src-35cb5e8a859239baecd5223b03e9a410078d9936.zip FreeBSD-src-35cb5e8a859239baecd5223b03e9a410078d9936.tar.gz |
Fix a bug where operations was carried on even if not implemented,
leading to handling of an invalid fdip object.
Reported and tested by: flo
MFC after: 2 months
X-MFC: 241519
Diffstat (limited to 'sys/fs/fuse/fuse_vnops.c')
-rw-r--r-- | sys/fs/fuse/fuse_vnops.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 75bd2dc..1774e0a 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -358,12 +358,10 @@ fuse_vnop_create(struct vop_create_args *ap) err = fdisp_wait_answ(fdip); - if (err == ENOSYS) { - debug_printf("create: got ENOSYS from daemon\n"); - fsess_set_notimpl(mp, FUSE_CREATE); - fdisp_destroy(fdip); - } else if (err) { - debug_printf("create: darn, got err=%d from daemon\n", err); + if (err) { + if (err == ENOSYS) + fsess_set_notimpl(mp, FUSE_CREATE); + debug_printf("create: got err=%d from daemon\n", err); goto out; } bringup: |