static const char *ovl_get_link(struct dentry *dentry, struct inode *inode, struct delayed_call *done) { const struct cred *old_cred; const char *p; if (!dentry) return ERR_PTR(-ECHILD); old_cred = ovl_override_creds(dentry->d_sb); p = vfs_get_link(ovl_dentry_real(dentry), done); revert_creds(old_cred); return p; }
static char *ecryptfs_readlink_lower(struct dentry *dentry, size_t *bufsiz) { DEFINE_DELAYED_CALL(done); struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); const char *link; char *buf; int rc; link = vfs_get_link(lower_dentry, &done); if (IS_ERR(link)) return ERR_CAST(link); rc = ecryptfs_decode_and_decrypt_filename(&buf, bufsiz, dentry->d_sb, link, strlen(link)); do_delayed_call(&done); if (rc) return ERR_PTR(rc); return buf; }