summaryrefslogtreecommitdiff
path: root/fatfs/dir.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-05-19 18:52:58 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-05-19 19:21:53 +0200
commit3ffb892a5db5ad64b87261fa01478401806894cf (patch)
tree1b76268c96024acbfa41f8fa1164f77d7a02d236 /fatfs/dir.c
parente840329de670757720cec729556b9b1f7d655ab5 (diff)
fatfs: fix error handling
* fatfs/dir.c (diskfs_dirrewrite_hard): Fix error handling.
Diffstat (limited to 'fatfs/dir.c')
-rw-r--r--fatfs/dir.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fatfs/dir.c b/fatfs/dir.c
index 9eea74c1..66c95d27 100644
--- a/fatfs/dir.c
+++ b/fatfs/dir.c
@@ -728,9 +728,10 @@ diskfs_dirrewrite_hard (struct node *dp, struct node *np, struct dirstat *ds)
entry_key.dir_inode = dp->cache_id;
entry_key.dir_offset = ((int) ds->entry) - ((int) ds->mapbuf);
err = vi_rlookup (entry_key, &inode, &vinode, 0);
-
assert (err != EINVAL);
-
+ if (err)
+ return err;
+
/* Lookup the node, we already have a reference. */
oldnp = diskfs_cached_ifind (inode);