summaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 19153a0a810c..8f15e8d71bba 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2722,37 +2722,6 @@ char *d_path(const struct path *path, char *buf, int buflen)
2722} 2722}
2723EXPORT_SYMBOL(d_path); 2723EXPORT_SYMBOL(d_path);
2724 2724
2725/**
2726 * d_path_with_unreachable - return the path of a dentry
2727 * @path: path to report
2728 * @buf: buffer to return value in
2729 * @buflen: buffer length
2730 *
2731 * The difference from d_path() is that this prepends "(unreachable)"
2732 * to paths which are unreachable from the current process' root.
2733 */
2734char *d_path_with_unreachable(const struct path *path, char *buf, int buflen)
2735{
2736 char *res = buf + buflen;
2737 struct path root;
2738 int error;
2739
2740 if (path->dentry->d_op && path->dentry->d_op->d_dname)
2741 return path->dentry->d_op->d_dname(path->dentry, buf, buflen);
2742
2743 get_fs_root(current->fs, &root);
2744 write_seqlock(&rename_lock);
2745 error = path_with_deleted(path, &root, &res, &buflen);
2746 if (error > 0)
2747 error = prepend_unreachable(&res, &buflen);
2748 write_sequnlock(&rename_lock);
2749 path_put(&root);
2750 if (error)
2751 res = ERR_PTR(error);
2752
2753 return res;
2754}
2755
2756/* 2725/*
2757 * Helper function for dentry_operations.d_dname() members 2726 * Helper function for dentry_operations.d_dname() members
2758 */ 2727 */