aboutsummaryrefslogtreecommitdiffstats
path: root/fs/inode.c
diff options
context:
space:
mode:
authorSerge E. Hallyn <serge@hallyn.com>2011-03-23 19:43:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-23 22:47:13 -0400
commit2e1496707560ecf98e9b0604622c0990f94861d3 (patch)
treed1473b70fad31a903fedc87221680678a6c6c5f6 /fs/inode.c
parente795b71799ff0b27365020c9ddaa25d0d83f99c8 (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/inode.c')
-rw-r--r--fs/inode.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/inode.c b/fs/inode.c
index a21d5a938a17..0b3da4a77704 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1735,11 +1735,14 @@ void inode_init_owner(struct inode *inode, const struct inode *dir,
1735} 1735}
1736EXPORT_SYMBOL(inode_init_owner); 1736EXPORT_SYMBOL(inode_init_owner);
1737 1737
1738/* 1738/**
1739 * return true if current either has CAP_FOWNER to the 1739 * inode_owner_or_capable - check current task permissions to inode
1740 * file, or owns the file. 1740 * @inode: inode being checked
1741 *
1742 * Return true if current either has CAP_FOWNER to the inode, or
1743 * owns the file.
1741 */ 1744 */
1742bool is_owner_or_cap(const struct inode *inode) 1745bool inode_owner_or_capable(const struct inode *inode)
1743{ 1746{
1744 struct user_namespace *ns = inode_userns(inode); 1747 struct user_namespace *ns = inode_userns(inode);
1745 1748
@@ -1749,4 +1752,4 @@ bool is_owner_or_cap(const struct inode *inode)
1749 return true; 1752 return true;
1750 return false; 1753 return false;
1751} 1754}
1752EXPORT_SYMBOL(is_owner_or_cap); 1755EXPORT_SYMBOL(inode_owner_or_capable);