aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 688aac951d11..170efbcb1a9b 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1843,9 +1843,22 @@ Elong:
1843 return ERR_PTR(-ENAMETOOLONG); 1843 return ERR_PTR(-ENAMETOOLONG);
1844} 1844}
1845 1845
1846/* write full pathname into buffer and return start of pathname */ 1846/**
1847char * d_path(struct dentry *dentry, struct vfsmount *vfsmnt, 1847 * d_path - return the path of a dentry
1848 char *buf, int buflen) 1848 * @dentry: dentry to report
1849 * @vfsmnt: vfsmnt to which the dentry belongs
1850 * @buf: buffer to return value in
1851 * @buflen: buffer length
1852 *
1853 * Convert a dentry into an ASCII path name. If the entry has been deleted
1854 * the string " (deleted)" is appended. Note that this is ambiguous.
1855 *
1856 * Returns the buffer or an error code if the path was too long.
1857 *
1858 * "buflen" should be positive. Caller holds the dcache_lock.
1859 */
1860char *d_path(struct dentry *dentry, struct vfsmount *vfsmnt,
1861 char *buf, int buflen)
1849{ 1862{
1850 char *res; 1863 char *res;
1851 struct path root; 1864 struct path root;