Check current task permissions to inode
bool inode_owner_or_capable(const struct inode * inode);
inode
inode being checked
Return true if current either has CAP_FOWNER in a namespace with the inode owner uid mapped, or owns the file.