ocfs2: Don't return -EFAULT from a corrupt xattr entry.
If the xattr disk structures are corrupt, return -EIO, not -EFAULT.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 151ba62..41a6ca0 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1239,7 +1239,7 @@
free = min_offs - ((void *)last - xs->base) - sizeof(__u32);
if (free < 0)
- return -EFAULT;
+ return -EIO;
if (!xs->not_found) {
size_t size = 0;