diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-03 19:46:45 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-03 19:46:45 -0400 |
commit | 2b235826098bb653982894dfc3f70fd029f6c2e4 (patch) | |
tree | ec525ddba74f58017a3f145bb68cf94376648c1c /fs/fuse/dir.c | |
parent | b4b52db71529bbe46da914eda772fb574914c94d (diff) | |
parent | c77054e518d9163578cfcad09826d7b959f95ece (diff) |
Merge branch 'master'
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r-- | fs/fuse/dir.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index e79e49b3eec..29f1e9f6e85 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -96,6 +96,8 @@ static int fuse_lookup_iget(struct inode *dir, struct dentry *entry, fuse_lookup_init(req, dir, entry, &outarg); request_send(fc, req); err = req->out.h.error; + if (!err && (!outarg.nodeid || outarg.nodeid == FUSE_ROOT_ID)) + err = -EIO; if (!err) { inode = fuse_iget(dir->i_sb, outarg.nodeid, outarg.generation, &outarg.attr); @@ -152,6 +154,10 @@ static int create_new_entry(struct fuse_conn *fc, struct fuse_req *req, 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) { |