summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/nfs/server/src/nfs-common.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/xlators/nfs/server/src/nfs-common.c b/xlators/nfs/server/src/nfs-common.c
index 69bf46702eb..5609b8efe7e 100644
--- a/xlators/nfs/server/src/nfs-common.c
+++ b/xlators/nfs/server/src/nfs-common.c
@@ -338,19 +338,19 @@ nfs_entry_loc_fill (inode_table_t *itable, ino_t ino, uint64_t gen, char *entry,
ret = -2;
entryinode = inode_grep (itable, parent, entry);
if (!entryinode) {
- if (how != NFS_RESOLVE_CREATE)
- goto err;
- else {
+ if (how == NFS_RESOLVE_CREATE) {
/* Even though we'll create the inode and the loc for
* a missing inode, we still need to return -2 so
* that the caller can use the filled loc to call
* lookup.
*/
entryinode = inode_new (itable);
- nfs_parent_inode_loc_fill (parent, entryinode, entry,
- loc);
- goto err;
+ ret = nfs_parent_inode_loc_fill (parent, entryinode,
+ entry, loc);
+ if (ret < 0)
+ ret = -3;
}
+ goto err;
}
ret = inode_path (parent, entry, &resolvedpath);