Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83109
b: refs/heads/master
c: 4bea580
h: refs/heads/master
i:
  83107: eead88c
v: v3
  • Loading branch information
David P. Quigley authored and Linus Torvalds committed Feb 5, 2008
1 parent 15a8098 commit a2a393c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 42492594043d621a7910ff5877c3eb9202870b45
refs/heads/master: 4bea58053f206be9a89ca35850f9ad295dac2042
15 changes: 8 additions & 7 deletions trunk/fs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit a2a393c

Please sign in to comment.