aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exportfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exportfs')
-rw-r--r--fs/exportfs/expfs.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index b42063cf1b2d..29ab099e3e08 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -19,19 +19,19 @@
19#define dprintk(fmt, args...) do{}while(0) 19#define dprintk(fmt, args...) do{}while(0)
20 20
21 21
22static int get_name(struct vfsmount *mnt, struct dentry *dentry, char *name, 22static int get_name(const struct path *path, char *name, struct dentry *child);
23 struct dentry *child);
24 23
25 24
26static int exportfs_get_name(struct vfsmount *mnt, struct dentry *dir, 25static int exportfs_get_name(struct vfsmount *mnt, struct dentry *dir,
27 char *name, struct dentry *child) 26 char *name, struct dentry *child)
28{ 27{
29 const struct export_operations *nop = dir->d_sb->s_export_op; 28 const struct export_operations *nop = dir->d_sb->s_export_op;
29 struct path path = {.mnt = mnt, .dentry = dir};
30 30
31 if (nop->get_name) 31 if (nop->get_name)
32 return nop->get_name(dir, name, child); 32 return nop->get_name(dir, name, child);
33 else 33 else
34 return get_name(mnt, dir, name, child); 34 return get_name(&path, name, child);
35} 35}
36 36
37/* 37/*
@@ -249,11 +249,10 @@ static int filldir_one(void * __buf, const char * name, int len,
249 * calls readdir on the parent until it finds an entry with 249 * calls readdir on the parent until it finds an entry with
250 * the same inode number as the child, and returns that. 250 * the same inode number as the child, and returns that.
251 */ 251 */
252static int get_name(struct vfsmount *mnt, struct dentry *dentry, 252static int get_name(const struct path *path, char *name, struct dentry *child)
253 char *name, struct dentry *child)
254{ 253{
255 const struct cred *cred = current_cred(); 254 const struct cred *cred = current_cred();
256 struct inode *dir = dentry->d_inode; 255 struct inode *dir = path->dentry->d_inode;
257 int error; 256 int error;
258 struct file *file; 257 struct file *file;
259 struct getdents_callback buffer; 258 struct getdents_callback buffer;
@@ -267,7 +266,7 @@ static int get_name(struct vfsmount *mnt, struct dentry *dentry,
267 /* 266 /*
268 * Open the directory ... 267 * Open the directory ...
269 */ 268 */
270 file = dentry_open(dget(dentry), mntget(mnt), O_RDONLY, cred); 269 file = dentry_open(path, O_RDONLY, cred);
271 error = PTR_ERR(file); 270 error = PTR_ERR(file);
272 if (IS_ERR(file)) 271 if (IS_ERR(file))
273 goto out; 272 goto out;