Only check directory xattr on ENOENT
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 8 May 2013 16:20:04 +0000 (09:20 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 10 May 2013 19:24:56 +0000 (12:24 -0700)
When SA xattrs are enabled only fallback to checking the directory
xattrs when the name is not found as a SA xattr.  Otherwise, the SA
error which should be returned to the caller is overwritten by the
directory xattr errors.  Positive return values indicating success
will also be immediately returned.

In the case of #1437 the ERANGE error was being correctly returned
by zpl_xattr_get_sa() only to be overridden with ENOENT which was
returned by the subsequent unnessisary call to zpl_xattr_get_dir().

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1437


No differences found