]> err.no Git - linux-2.6/blobdiff - fs/xattr.c
Merge branch 'async-tx-for-linus' of git://lost.foo-projects.org/~dwillia2/git/iop...
[linux-2.6] / fs / xattr.c
index 1858552a6a1a0c6af76afb92316507c7d2d352eb..f7c8f87bb39065c1ed6fa3011bbb653fcc029e5c 100644 (file)
@@ -145,11 +145,6 @@ vfs_getxattr(struct dentry *dentry, char *name, void *value, size_t size)
        if (error)
                return error;
 
-       if (inode->i_op->getxattr)
-               error = inode->i_op->getxattr(dentry, name, value, size);
-       else
-               error = -EOPNOTSUPP;
-
        if (!strncmp(name, XATTR_SECURITY_PREFIX,
                                XATTR_SECURITY_PREFIX_LEN)) {
                const char *suffix = name + XATTR_SECURITY_PREFIX_LEN;
@@ -158,9 +153,15 @@ vfs_getxattr(struct dentry *dentry, char *name, void *value, size_t size)
                 * Only overwrite the return value if a security module
                 * is actually active.
                 */
-               if (ret != -EOPNOTSUPP)
-                       error = ret;
+               if (ret == -EOPNOTSUPP)
+                       goto nolsm;
+               return ret;
        }
+nolsm:
+       if (inode->i_op->getxattr)
+               error = inode->i_op->getxattr(dentry, name, value, size);
+       else
+               error = -EOPNOTSUPP;
 
        return error;
 }