fix
diff --git a/kernel/dir.c b/kernel/dir.c
index e8b2d0f..3428668 100644
--- a/kernel/dir.c
+++ b/kernel/dir.c
@@ -112,7 +112,9 @@
fuse_lookup_init(req, dir, entry, &outarg);
request_send(fc, req);
err = req->out.h.error;
- if (!err) {
+ if (!err && outarg.nodeid == FUSE_ROOT_ID)
+ err = -EIO;
+ else if (!err && outarg.nodeid) {
inode = fuse_iget(dir->i_sb, outarg.nodeid, outarg.generation,
&outarg.attr);
if (!inode) {
@@ -168,6 +170,10 @@
fuse_put_request(fc, req);
return err;
}
+ if (!outarg.nodeid || outarg.nodeid == FUSE_ROOT_ID) {
+ fuse_put_request(fc, req);
+ return -EIO;
+ }
inode = fuse_iget(dir->i_sb, outarg.nodeid, outarg.generation,
&outarg.attr);
if (!inode) {