From: Joel Becker Date: Tue, 21 Oct 2008 01:24:03 +0000 (-0700) Subject: ocfs2: Don't return -EFAULT from a corrupt xattr entry. X-Git-Tag: v2.6.28-rc5~82^2~15 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b37c4d84e9d16fd5b6f31197f02ea0a112fc9e99;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Mark Fasheh --- diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 151ba6257fb..41a6ca004ae 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -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;