aboutsummaryrefslogtreecommitdiffstats
path: root/fs/inode.c
diff options
context:
space:
mode:
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);