Skip to contentSkip to conversation

ocfs2: fix improper handling of return errno

PATCH New [email protected] 1 participant 1 message May 26, 2016 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 5/10 ocfs2: fix improper handling of return errno

From: Eric Ren <[email protected]>
Subject: ocfs2: fix improper handling of return errno

Previously, if bad inode was found in ocfs2_iget(), -ESTALE was returned back to the caller anyway. Since commit d2b9d71a2da7 ("ocfs2: check/fix inode block for online file check") can handle with return value from ocfs2_read_locked_inode() now, we know the exact errno returned for us.

---

 fs/ocfs2/inode.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
fs/ocfs2/inode.c renamed from fs/ocfs2/inode.c~ocfs2-fix-improper-handling-of-return-errno +1 -6
diff -puN fs/ocfs2/inode.c~ocfs2-fix-improper-handling-of-return-errno fs/ocfs2/inode.c
@@ -176,12 +176,7 @@ struct inode *ocfs2_iget(struct ocfs2_su
 	}
 	if (is_bad_inode(inode)) {
 		iput(inode);
-		if ((flags & OCFS2_FI_FLAG_FILECHECK_CHK) ||
-		    (flags & OCFS2_FI_FLAG_FILECHECK_FIX))
-			/* Return OCFS2_FILECHECK_ERR_XXX related errno */
-			inode = ERR_PTR(rc);
-		else
-			inode = ERR_PTR(-ESTALE);
+		inode = ERR_PTR(rc);
 		goto bail;
 	}
 

_
--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html