Skip to content

Commit

Permalink
ocfs2: Don't return -EFAULT from a corrupt xattr entry.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joel Becker authored and Mark Fasheh committed Nov 10, 2008
1 parent f6087fb commit b37c4d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ocfs2/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ static int ocfs2_xattr_set_entry(struct inode *inode,

free = min_offs - ((void *)last - xs->base) - sizeof(__u32);
if (free < 0)
return -EFAULT;
return -EIO;

if (!xs->not_found) {
size_t size = 0;
Expand Down

0 comments on commit b37c4d8

Please sign in to comment.