Skip to content

Commit

Permalink
d_path: kerneldoc cleanup
Browse files Browse the repository at this point in the history
Move and update d_path() kernel API documentation.

Signed-off-by: Jan Blunck <jblunck@suse.de>
Acked-by: Christoph Hellwig <hch@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jan Blunck authored and Linus Torvalds committed Feb 15, 2008
1 parent 329c97f commit a03a8a7
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1843,9 +1843,22 @@ static char *__d_path(struct dentry *dentry, struct vfsmount *vfsmnt,
return ERR_PTR(-ENAMETOOLONG);
}

/* write full pathname into buffer and return start of pathname */
char * d_path(struct dentry *dentry, struct vfsmount *vfsmnt,
char *buf, int buflen)
/**
* d_path - return the path of a dentry
* @dentry: dentry to report
* @vfsmnt: vfsmnt to which the dentry belongs
* @buf: buffer to return value in
* @buflen: buffer length
*
* Convert a dentry into an ASCII path name. If the entry has been deleted
* the string " (deleted)" is appended. Note that this is ambiguous.
*
* Returns the buffer or an error code if the path was too long.
*
* "buflen" should be positive. Caller holds the dcache_lock.
*/
char *d_path(struct dentry *dentry, struct vfsmount *vfsmnt,
char *buf, int buflen)
{
char *res;
struct path root;
Expand Down

0 comments on commit a03a8a7

Please sign in to comment.