diff options
-rw-r--r-- | fs/9p/vfs_inode.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index de9a39590b70..b44c99979143 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -697,8 +697,8 @@ static struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry, | |||
697 | if (IS_ERR(fid)) { | 697 | if (IS_ERR(fid)) { |
698 | result = PTR_ERR(fid); | 698 | result = PTR_ERR(fid); |
699 | if (result == -ENOENT) { | 699 | if (result == -ENOENT) { |
700 | d_add(dentry, NULL); | 700 | inode = NULL; |
701 | return NULL; | 701 | goto inst_out; |
702 | } | 702 | } |
703 | 703 | ||
704 | return ERR_PTR(result); | 704 | return ERR_PTR(result); |
@@ -715,7 +715,8 @@ static struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry, | |||
715 | if (result < 0) | 715 | if (result < 0) |
716 | goto error; | 716 | goto error; |
717 | 717 | ||
718 | if ((fid->qid.version) && (v9ses->cache)) | 718 | inst_out: |
719 | if (v9ses->cache) | ||
719 | dentry->d_op = &v9fs_cached_dentry_operations; | 720 | dentry->d_op = &v9fs_cached_dentry_operations; |
720 | else | 721 | else |
721 | dentry->d_op = &v9fs_dentry_operations; | 722 | dentry->d_op = &v9fs_dentry_operations; |