]> git.baikalelectronics.ru Git - kernel.git/commit
jffs2: allow to discriminate between recoverable and non-recoverable errors
authorJean-Christophe DUBOIS <jcd@tribudubois.net>
Thu, 10 May 2012 15:13:44 +0000 (17:13 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 14 May 2012 04:30:34 +0000 (23:30 -0500)
commit79838201fc7d1daec3fbbf0406e6b86ea57a586f
tree1eda72635e2a5c7a5a997fdd579656db2a0da6e0
parent263761967e250c7ad6f3d695aeac8646883dbb33
jffs2: allow to discriminate between recoverable and non-recoverable errors

This patch is basically a revert of commit 24806959b1718339b2b046f882bee7a581c96376.

It allows JFFS2 to make the distinction between a potential transient
error (reading or writing the media) and a non recoverable error like a
bad CRC on the extended attribute data or some insconsitent parameters.

In order to make clear that the error is indeed intended to report a
corrupted attribute, a new local error code (JFFS2_XATTR_IS_CORRUPTED)
is introduced rather than returning a confusing positive EIO, which is
what led to the inappropriate "fix" last time.

This error code is never reported to user space and only checked locally
in this file.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
fs/jffs2/xattr.c