diff options
author | Serge E. Hallyn <serge@hallyn.com> | 2011-03-23 19:43:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-23 22:47:13 -0400 |
commit | 2e1496707560ecf98e9b0604622c0990f94861d3 (patch) | |
tree | d1473b70fad31a903fedc87221680678a6c6c5f6 /fs/attr.c | |
parent | e795b71799ff0b27365020c9ddaa25d0d83f99c8 (diff) |
userns: rename is_owner_or_cap to inode_owner_or_capable
And give it a kernel-doc comment.
[akpm@linux-foundation.org: btrfs changed in linux-next]
Signed-off-by: Serge E. Hallyn <serge.hallyn@canonical.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Daniel Lezcano <daniel.lezcano@free.fr>
Acked-by: David Howells <dhowells@redhat.com>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/attr.c')
-rw-r--r-- | fs/attr.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -59,7 +59,7 @@ int inode_change_ok(const struct inode *inode, struct iattr *attr) | |||
59 | 59 | ||
60 | /* Make sure a caller can chmod. */ | 60 | /* Make sure a caller can chmod. */ |
61 | if (ia_valid & ATTR_MODE) { | 61 | if (ia_valid & ATTR_MODE) { |
62 | if (!is_owner_or_cap(inode)) | 62 | if (!inode_owner_or_capable(inode)) |
63 | return -EPERM; | 63 | return -EPERM; |
64 | /* Also check the setgid bit! */ | 64 | /* Also check the setgid bit! */ |
65 | if (!in_group_p((ia_valid & ATTR_GID) ? attr->ia_gid : | 65 | if (!in_group_p((ia_valid & ATTR_GID) ? attr->ia_gid : |
@@ -69,7 +69,7 @@ int inode_change_ok(const struct inode *inode, struct iattr *attr) | |||
69 | 69 | ||
70 | /* Check for setting the inode time. */ | 70 | /* Check for setting the inode time. */ |
71 | if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET)) { | 71 | if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET)) { |
72 | if (!is_owner_or_cap(inode)) | 72 | if (!inode_owner_or_capable(inode)) |
73 | return -EPERM; | 73 | return -EPERM; |
74 | } | 74 | } |
75 | 75 | ||