summaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
authorMiklos Szeredi2015-06-19 10:29:13 +0200
committerAl Viro2015-06-24 00:00:05 +0200
commit9bf39ab2adafd7cf8740859cb49e7b7952813a5d (patch)
tree2dc4ff57033635f0900328c99020af7bf71a31d2 /fs/open.c
parentoverlayfs: Make f_path always point to the overlay and f_inode to the underlay (diff)
downloadkernel-qcow2-linux-9bf39ab2adafd7cf8740859cb49e7b7952813a5d.tar.gz
kernel-qcow2-linux-9bf39ab2adafd7cf8740859cb49e7b7952813a5d.tar.xz
kernel-qcow2-linux-9bf39ab2adafd7cf8740859cb49e7b7952813a5d.zip
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>
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/open.c b/fs/open.c
index b1c5823b7f11..1dbc79358d59 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -823,6 +823,12 @@ int finish_no_open(struct file *file, struct dentry *dentry)
}
EXPORT_SYMBOL(finish_no_open);
+char *file_path(struct file *filp, char *buf, int buflen)
+{
+ return d_path(&filp->f_path, buf, buflen);
+}
+EXPORT_SYMBOL(file_path);
+
/**
* vfs_open - open the file at the given path
* @path: path to open