bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[committed hurd 2/2] fatfs: fix error handling


From: Justus Winter
Subject: [committed hurd 2/2] fatfs: fix error handling
Date: Tue, 19 May 2015 19:52:31 +0200

* fatfs/dir.c (diskfs_dirrewrite_hard): Fix error handling.
---
 fatfs/dir.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fatfs/dir.c b/fatfs/dir.c
index 9eea74c..66c95d2 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);
 
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]