diff options
Diffstat (limited to 'fs/xattr.c')
-rw-r--r-- | fs/xattr.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/xattr.c b/fs/xattr.c index 1858552a6a1a..f7c8f87bb390 100644 --- a/fs/xattr.c +++ b/fs/xattr.c | |||
@@ -145,11 +145,6 @@ vfs_getxattr(struct dentry *dentry, char *name, void *value, size_t size) | |||
145 | if (error) | 145 | if (error) |
146 | return error; | 146 | return error; |
147 | 147 | ||
148 | if (inode->i_op->getxattr) | ||
149 | error = inode->i_op->getxattr(dentry, name, value, size); | ||
150 | else | ||
151 | error = -EOPNOTSUPP; | ||
152 | |||
153 | if (!strncmp(name, XATTR_SECURITY_PREFIX, | 148 | if (!strncmp(name, XATTR_SECURITY_PREFIX, |
154 | XATTR_SECURITY_PREFIX_LEN)) { | 149 | XATTR_SECURITY_PREFIX_LEN)) { |
155 | const char *suffix = name + XATTR_SECURITY_PREFIX_LEN; | 150 | const char *suffix = name + XATTR_SECURITY_PREFIX_LEN; |
@@ -158,9 +153,15 @@ vfs_getxattr(struct dentry *dentry, char *name, void *value, size_t size) | |||
158 | * Only overwrite the return value if a security module | 153 | * Only overwrite the return value if a security module |
159 | * is actually active. | 154 | * is actually active. |
160 | */ | 155 | */ |
161 | if (ret != -EOPNOTSUPP) | 156 | if (ret == -EOPNOTSUPP) |
162 | error = ret; | 157 | goto nolsm; |
158 | return ret; | ||
163 | } | 159 | } |
160 | nolsm: | ||
161 | if (inode->i_op->getxattr) | ||
162 | error = inode->i_op->getxattr(dentry, name, value, size); | ||
163 | else | ||
164 | error = -EOPNOTSUPP; | ||
164 | 165 | ||
165 | return error; | 166 | return error; |
166 | } | 167 | } |