Skip to contentSkip to conversation

f2fs: set errno when f2fs_iget failed in recover_dentry

PATCH New Chao Yu 1 participant 1 message Apr 28, 2014

Subsystems (2)
lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/2 f2fs: set errno when f2fs_iget failed in recover_dentry

We should set the error number correctly when we fail in recover_dentry(), so the recover flow could stop for the reason as error number shows instead of continuing.

---
 fs/f2fs/recovery.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/f2fs/recovery.c +2 -1
index be1e3e8..e950a2f 100644
@@ -75,7 +75,8 @@ retry:
 		einode = f2fs_iget(inode->i_sb, le32_to_cpu(de->ino));
 		if (IS_ERR(einode)) {
 			WARN_ON(1);
-			if (PTR_ERR(einode) == -ENOENT)
+			err = PTR_ERR(einode);
+			if (err == -ENOENT)
 				err = -EEXIST;
 			goto out_unmap_put;
 		}
Signature · 10 lines
1.7.9.5



------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs