vfs: add file_path() helper
Turn d_path(&file->f_path, ...); into file_path(file, ...); Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -2936,7 +2936,7 @@ int fsg_common_create_lun(struct fsg_common *common, struct fsg_lun_config *cfg,
|
||||
if (fsg_lun_is_open(lun)) {
|
||||
p = "(error)";
|
||||
if (pathbuf) {
|
||||
p = d_path(&lun->filp->f_path, pathbuf, PATH_MAX);
|
||||
p = file_path(lun->filp, pathbuf, PATH_MAX);
|
||||
if (IS_ERR(p))
|
||||
p = "(error)";
|
||||
}
|
||||
|
@@ -341,7 +341,7 @@ ssize_t fsg_show_file(struct fsg_lun *curlun, struct rw_semaphore *filesem,
|
||||
|
||||
down_read(filesem);
|
||||
if (fsg_lun_is_open(curlun)) { /* Get the complete pathname */
|
||||
p = d_path(&curlun->filp->f_path, buf, PAGE_SIZE - 1);
|
||||
p = file_path(curlun->filp, buf, PAGE_SIZE - 1);
|
||||
if (IS_ERR(p))
|
||||
rc = PTR_ERR(p);
|
||||
else {
|
||||
|
Reference in New Issue
Block a user