Skip to content

Commit

Permalink
vfs: remove d_path_with_unreachable
Browse files Browse the repository at this point in the history
The last caller was removed >2 years ago in commit 7b2a69b.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Jeff Layton authored and Al Viro committed Feb 23, 2013
1 parent 6b4d0b2 commit ad8ca37
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
31 changes: 0 additions & 31 deletions fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -2722,37 +2722,6 @@ char *d_path(const struct path *path, char *buf, int buflen)
}
EXPORT_SYMBOL(d_path);

/**
* d_path_with_unreachable - return the path of a dentry
* @path: path to report
* @buf: buffer to return value in
* @buflen: buffer length
*
* The difference from d_path() is that this prepends "(unreachable)"
* to paths which are unreachable from the current process' root.
*/
char *d_path_with_unreachable(const struct path *path, char *buf, int buflen)
{
char *res = buf + buflen;
struct path root;
int error;

if (path->dentry->d_op && path->dentry->d_op->d_dname)
return path->dentry->d_op->d_dname(path->dentry, buf, buflen);

get_fs_root(current->fs, &root);
write_seqlock(&rename_lock);
error = path_with_deleted(path, &root, &res, &buflen);
if (error > 0)
error = prepend_unreachable(&res, &buflen);
write_sequnlock(&rename_lock);
path_put(&root);
if (error)
res = ERR_PTR(error);

return res;
}

/*
* Helper function for dentry_operations.d_dname() members
*/
Expand Down
1 change: 0 additions & 1 deletion include/linux/dcache.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
extern char *__d_path(const struct path *, const struct path *, char *, int);
extern char *d_absolute_path(const struct path *, char *, int);
extern char *d_path(const struct path *, char *, int);
extern char *d_path_with_unreachable(const struct path *, char *, int);
extern char *dentry_path_raw(struct dentry *, char *, int);
extern char *dentry_path(struct dentry *, char *, int);

Expand Down

0 comments on commit ad8ca37

Please sign in to comment.